Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@actinc/dls

act-org6.9kMIT9.12.0TypeScript support: included

Design Language System (DLS) for ACT & Encoura front-end projects.

design language system, dls, material-ui, react, storybook, typescript

readme

Design Language System (DLS)

Version   Build   License   Downloads

The Design Language System for ACT & Encoura front-end projects. View the UI components here.

Project Setup

Installation

In order to use the DLS, you must install it along with Material UI version 6.x and React version 18.x or 19.x.

npm install --save @actinc/dls@latest @mui/material @mui/system @mui/x-data-grid react react-dom

Choosing a Theme

This DLS is built on top of the theme engine from Material UI, and ships with several themes out of the box:

  1. "ACT": for ACT's "traditional" look and feel
  2. "ACT_ET": for ACT's "Emerging Technology" look and feel
  3. "ENCOURA": for the Encoura's "MyEncoura" look and feel
  4. "ENCOURA_CLASSIC": for Encoura's "Classic" look and feel
  5. "ENCOURAGE": for the Encoura's "Encourage for Students" look and feel
  6. "ENCOURAGE_E4E": for the Encoura's "Encourage for Educators" look and feel

To apply one of these themes to your components, simply wrap your application in the ThemeProvider component and specify a theme!

import { ThemeProvider } from '@actinc/dls/components/ThemeProvider';

...

const MyApp = () => (
  // specify a theme here!
  <ThemeProvider theme="ACT_ET">
    <App />
  </ThemeProvider>
);

Extending Themes

You can exend the core DLS themes using using our variation on the createTheme generator from Material UI:

import deepMerge from 'deepmerge';
import { createTheme } from '@actinc/dls/styles/createTheme';
import { THEME_ACT } from '@actinc/dls/styles/themeAct';
import { ThemeProvider } from '@actinc/dls/components/ThemeProvider';

const myExtendedTheme = createTheme(
  deepMerge(THEME_ACT, {
    // theme customizations go here!
  }),
);

const MyApp = () => (
  <ThemeProvider theme={myExtendedTheme}>
    <App />
  </ThemeProvider>
);

Custom Themes

Alternatively, you can build your own theme from scratch using our variation on the createTheme generator from Material UI. Our version takes the same parameters, but will return a strongly typed version of the theme with any customizations you may have added.

import { ThemeProvider } from '@actinc/dls/components/ThemeProvider';
import { createTheme } from '@actinc/dls/styles/createTheme';

const myCustomTheme = createTheme({
  // build your theme here!
});

const MyApp = () => (
  <ThemeProvider theme={myCustomTheme}>
    <App />
  </ThemeProvider>
);

Custom Themes And Styled Components

Within your styled components, if you need to access custom a theme variable that is not present in the default MUI Theme type, we provide a helper function to generate a styled function that is strongly typed to your theme:

import { createThemeStyled } from '@actinc/dls/helpers/styled';
import { THEME_ACT } from '@actinc/dls/styles/themeAct';
import TableCell from '@mui/material/TableCell';

const styled = createThemeStyled(THEME_ACT);

const StyledTypography = styled(TableCell)(({ theme }) => ({
  // `customDims` is not available on the default theme
  height: theme.customDims.heights.tableHeader,
}));

Custom Themes and Module Augmentation

In cases where you want to "patch" or augment an underlying type (for example, if adding a custom color to your theme's palette), you can create a TS definition file and include it in your project's tsconfig.json.

Steps:

  • Create your TS definition file (must use the .d.ts file extension). Example here.
  • Ensure that your definition file does not use import aliases.
  • Do a release. The DLS will automatically include the definition file in the build.
  • In your project's repo, update your tsconfig.json's include field to point to the file in your node_modules directory. Example: ./node_modules/@actinc/dls/path/to/your/index.d.ts.
  • You may need to restart your IDE's TS server for the changes to appear.

Load Fonts

Montserrat

The ACT and ACT_ET themes assume that the Montserrat font is available in the browser. Therefore, it is recommended that you include the following font reference in the head of your React app:

<link
  href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap"
  rel="stylesheet"
/>

Museo Sans

The ENCOURA and ENCOURA_CLASSIC themes assume that the Museo Sans font is available in the browser. Include this embed code in the head of your React app after obtaining the licensed font URL from Marketing:

<style>
  @import url('licensed-font-url');
</style>

Work Sans, Roboto, Roboto Mono

The ENCOURAGE and ENCOURAGE_E4E themes assume that the Work Sans, Roboto, and the Roboto Mono fonts are available in the browser. Therefore, it is recommended that you include the following font reference in the head of your React app:

<!-- Fonts required for ENCOURAGE: -->
<link
  href="https://fonts.googleapis.com/css2?display=swap&family=Work+Sans:wght@200..800"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css2?display=swap&family=Roboto:wght@300;400;500;700"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css2?display=swap&family=Roboto+Mono:wght@200..700"
  rel="stylesheet"
/>

<!-- Fonts required for ENCOURAGE_E4E: -->
<link
  href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css2?display=swap&family=Work+Sans:wght@200..800"
  rel="stylesheet"
/>

CSS Baseline

It is recommended to inject the CssBaseline component from Material UI near the root of your component tree in order to reset and normalize browser styles for your project:

import { CssBaseline } from '@mui/material';

...

const MyApp = () => (
  ...
  <CssBaseline />
  ...
);

Server-Side Rendering

If your project's React framework supports SSR, you can configure the DLS components for server-side rendering. See the official Next.js example here.

Icons

Option 1: Find and import from the DLS

The DLS re-exports all icons that are provided by the mdi-material-ui package. This is an expansive list of icons that are managed by the material community. You can search for a specific icon to use on materialdesignicons.com. Once you've found the perfect icon, you can use it in your project like so:

// Import the needed icon(s) directly, to avoid bundle size bloat.
import PollBox from '@actinc/dls/icons/PollBox';

...

const MyComponent = () => (
  ...
  <PollBox />
  ...
);

Option 2: Find and import from @mui/icons-material

If the DLS doesn't provide the icon you're looking for, as a second line of defense, you can search for icons in the @mui/icons-material library. While most of these icons can be found directly in the DLS via mdi-material-ui, there is some unique selection within this library that could be useful to you. You can search for a specific icon to use on mui.com. Once you've found the perfect icon, you can use it in your project like so:

// Import the needed icon(s) directly, to avoid bundle size bloat.
import PollIcon from '@mui/icons-material/Poll';

...

const MyComponent = () => (
  ...
  <PollIcon />
  ...
);

Option 3: Create a custom icon

When all else fails, you can create a custom icon using the SvgIcon component from Material UI. Here's an example:

import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import React from 'react';

export const CustomIcon: React.FC<SvgIconProps> = (props: SvgIconProps): React.ReactElement<SvgIconProps> => (
  <SvgIcon style={{ fill: 'none' }} viewBox="0 0 24 24" {...props}>
    <path d="<insert-svg-data-here>" />
  </SvgIcon>
);

export default CustomIcon;

Import Stuff

That's it! You're ready to use the DLS. Simply import the components, constants, context, helpers, hooks, icons, styles, and types that you need:

// components
import { Alert } from '@actinc/dls/components/Alert';
// constants
import { SORT_DIRECTION_TYPES } from '@actinc/dls/constants';
// context
import { AlertContext } from '@actinc/dls/context';
// helpers
import { search } from '@actinc/dls/helpers';
// hooks
import { useLocalStorage } from '@actinc/dls/hooks';
// icons
import ChevronDown from '@actinc/dls/icons/ChevronDown';
// styles & themes
import { THEME_ACT } from '@actinc/dls/styles/themeAct';
// types
import { SortObject } from '@actinc/dls/types';

Transient Props and Styled Components

The DLS provides a customized styled helper which omits transient props (those starting with $) from the rendered HTML, while still being able to use those parameters in styled components. Use as a drop in replacement of the styled function that exists in @mui/material/styles:

import { styled } from '@actinc/dls/helpers/styled';
import Button, { ButtonProps } from '@mui/material/Button';
import * as React from 'react';

const StyledButton = styled(Button)<ButtonProps & { $ultraWide: boolean }>(
  ({ $ultraWide, theme }) => ({
    paddingLeft: $ultraWide ? theme.spacing(8) : theme.spacing(4),
    paddingRight: $ultraWide ? theme.spacing(8) : theme.spacing(4),
  }),
);

const MyComponent: React.FC = () => {
  return <StyledButton $ultraWide />;
};

ES Modules & Tree Shaking

Version <= 6 of the DLS were built and exported as CommonJS modules. While this allowed the simplest integration of the DLS into any project, it also resulted in project bundles being larger than desired due to the inability of bundlers to tree-shake the DLS.

In version >= 7 of the DLS, we are now building and exporting the library as ECMAScript modules. This allows your project's bundler to much more easily read and tree-shake the DLS right out of the box. (No more need for babel-plugin-transform-imports!)

Furthermore, the DLS's package.json is also setting:

"sideEffects": false,

to instruct builders to enable even deeper tree-shaking. This should make bundle sizes significantly smaller with less effort. However, the tradeoff is that in certain scenarios, like Lazy Loading, if you are expecting a dependency to be there that is now removed from tree-shaking, things will break and you may need to import that dependency directly in a parent bundle.

SyntaxError: Unexpected token 'export'

One downside of exporting the DLS as ECMAScript modules is that the import and export keywords are preserved, which may cause your packager/runner to throw:

SyntaxError: Unexpected token 'export'

If you see this error, you'll need to instruct your packager/runner to transpile the DLS on-the-fly.

Next.js

You can do this in a Next.js app by adding the DLS to the transpilePackages option in your next.config.js file.

transpilePackages: ['@actinc/dls'],

Jest

You can do this in the Jest test runner by omitting the DLS from the transformIgnorePatterns option in your jest.config.js file.

transformIgnorePatterns: ['/node_modules/(?!(@actinc/dls)/)'],

Local Development

Check out the developer guide to learn how to build effectively for the DLS.

To run the DLS locally:

  1. Install node modules: npm install
  2. Start the Storybook component visualizer: npm start

How to Iterate Locally

Option 1: Creating a Local Build

When you're ready to pilot your changes to this library in your local project:

  1. Run the npm run pack command. When it finishes running, it will generate a .tgz file in the /dist folder with the following name format actinc-dls-<version-number>.tgz;
  2. Access the package.json file of your local project in which the @actinc/dls package will be tested, and make the following edit:

    "dependencies": {
      // Before (pulling from NPM via version number):
      "@actinc/dls": "9.2.1",
      // After (pointing to the local .tgz file):
      "@actinc/dls": "file:../path/to/@actinc/dls/dist/actinc-dls-<version-number>.tgz",
      ...
    }
  3. Run npm update @actinc/dls to refresh your project's node_modules folder.

  4. You can now run your project with the local changes made to this library!

  5. If you want to make any further edits to this library, simply run npm run pack to package up the changes, and then npm update @actinc/dls in your local project to pull them in.

  6. When you're done piloting the changes, simply revert your project's package.json file to pull this library from NPM, and run npm update @actinc/dls to refresh your project's node_modules folder.

Option 2: Real-time Previews

For rapid iteration, you can run a live copy of this library in your downstream project:

  1. In this library, run the watch script: npm run watch

  2. In your project, install a local build of this library: npm install <path-to-this-repo>/dist

Under the hood, this creates a symlink between the local build and your project. When changes are detected under the src folder, a new build will be output into the dist folder and picked up by your project.

Once you are happy with the changes, you'll want to destroy this symlink and replace the local build with a formal/hosted version of this library. You can do that by running the following commands in your project:

  1. npm uninstall @actinc/dls

  2. npm install @actinc/dls@<pick-your-version> --save --save-exact

npm Scripts

There are lots of npm scripts at your disposal during local development. Here are some of the more important ones:

Script Description
npm run build Transpiles DLS from TypeScript (./src) into ES5 (./dist).
npm run build-storybook Creates a static website for deployment (./storybook-static).
npm start Starts the Storybook component visualizer.
npm test Runs all tests.
npm run release Publishes a new release of the DLS.
npm run release:storybook Publishes a new release of Storybook (make sure to pull latest main).
npm run watch Watch the src folder for changes and transpile on-the-fly to dist.

Committing Code

semantic-release scans commits to manage package.json versions and CHANGELOG.MD

It is important that we accurately capture what type of development we are doing.

  • For changes to storybook (i.e. no change to components), use the docs tag:
git commit -m "docs: Added stories for Alert"
  • For patches to existing components, use fix:
git commit -m "fix: Fixed Snackbar not appear in center of screen"
  • For new functionality, use feat:
git commit -m "feat: Added Carousel component"

Pinned Packages

Some npm packages are pinned to non-current versions for a specific reason:

Package Version Reason

changelog

9.12.0 (2025-03-26)

Bug Fixes

  • Add storybook entry (1595902)
  • Change new storybook entry name (bd4613b)
  • Extend inputLabelProps to InputLabel element (37e225e)

Features

  • Change InputLabel required text to asterisk instead of required text (a315e22)

9.11.0 (2025-03-18)

Features

  • Switch from moment to dayjs to reduce bundle size (dcc60ad)

9.10.0 (2025-03-18)

Features

  • Use deeper lodash imports to reduce bundle size; enforce this through eslint (f77dd1d)

9.9.0 (2025-03-18)

Features

  • Bump 'color' to v5.0.0 (d435b7d)
  • Bump 'react-map-gl' to v8 (0ac0d74)

9.8.0 (2025-03-18)

Features

  • Bump dependencies to their latest compatible releases (03e7913)

9.7.3 (2025-03-18)

Bug Fixes

9.7.2 (2025-01-22)

Bug Fixes

  • Bump dependency versions, including notistack to a R19-compatible version (791282d)
  • Reconstruct lock file, remove more overrides (501ab76)

9.7.1 (2025-01-13)

Bug Fixes

  • Include input declaration files in the build output (a9b342d)

9.7.0 (2025-01-08)

Features

  • Export OptionsObject typedef from notistack so downstream apps can tap into it (e62fb52)

9.6.0 (2025-01-07)

Features

9.5.0 (2024-12-10)

Features

  • Export more internals from the E4E theme (3c15da1)

9.4.1 (2024-12-05)

Bug Fixes

  • [E4E-1684]: Fix snapshots tests (116eda6)

9.4.0 (2024-11-21)

Features

9.3.2 (2024-11-19)

Bug Fixes

  • Fixed outdated shadows on E4E theme (203b7fb)
  • Regen snapshots (498f780)

9.3.1 (2024-11-15)

Bug Fixes

  • Export ThemeCustomizations type from themeEncourageE4E (8ad52aa)

9.3.0 (2024-11-14)

Features

  • Add Encourage E4E theme (70a8355)
  • Export THEME_ENCOURAGE_E4E from dls/styles direcotry (1a5927e)
  • Update theme from E4E (be3247a)

9.2.1 (2024-10-01)

Bug Fixes

  • Fix maps not highlinting states properly (df85938)
  • Fix package-lock error (7870341)
  • Fix ts erros on map and heatmap (ef63983)

9.2.0 (2024-09-26)

Features

9.1.0 (2024-09-25)

Features

  • Add more color variations for Encourage Theme (8a8caf1)

9.0.1 (2024-09-06)

Bug Fixes

  • Bumps mdi-material-ui to 7.9.2 for improved MUI 6 compatibility (3508def)

9.0.0 (2024-09-06)

  • Merge pull request #459 from act-org/jc-mui-6 (c5a95ae)

Bug Fixes

  • Override mdi-material-ui to work with @mui/material v6 (23ab7be)
  • Raise minimum @mui version to v6, @mui/x to v7 (46f256d)
  • Replace all instances of Grid with Grid2 (08bda7f)

Features

  • Bump MUI packages to v6 (3a97062)

BREAKING CHANGES

  • Upgrade MUI to Version 6
  • The DLS now utilizes Grid2 from '@mui/material/Grid2' (MUI v6)

8.9.0 (2024-08-07)

Features

  • Add additional argument types in story (8e55db9)
  • Add custom props to DialogContinueSession component (461a9b1)

8.8.1 (2024-07-24)

Bug Fixes

  • Remove unnecessary onMouseMove change in BarChart (a2f9b9e)

8.8.0 (2024-07-24)

Bug Fixes

  • Handle merge conflicts (7ef2ff3)
  • Remove unncessary newline (49144c5)

Features

  • Adds correct role and status to BarChart/CustomTooltip for screen reader access (f7ab341)
  • Adds correct role and status to BarChart/CustomTooltip for screen reader access (f420d4b)
  • Adds tabIndex to BarChart bar label (893acbe)
  • Applies accessibilityLayer prop to BarChart and adds title and description props (d20fedb)

8.7.0 (2024-07-08)

Bug Fixes

  • Update county map example data to include new CT planning region (3d4890b)
  • Update FIPS for Capitol planning region in example data (092dcc0)

Features

  • Update public counties.json file with new Connecticut planning regions (aecdca2)

8.6.0 (2024-06-08)

Features

  • Add custom title container story (48445a5)
  • Add titleGridContainerProps optional property to Empty State (0a8c9a9)

8.5.0 (2024-05-31)

Bug Fixes

  • Replace default props with default function arguments, to prep for React 19 (ea0832e)

Features

  • Bump mdi-material-ui (icons) to the latest release; bump dev-deps (59d41c9)
  • Enhanced the alerts system to accept custom alert components; added stories to demonstrate (7fed2d1)

8.4.1 (2024-05-08)

Bug Fixes

  • Change mapPopupProps to be Partial (3155f79)

8.4.0 (2024-05-03)

Features

  • Bumped deps and dev-deps to their latest compatible releases (4c8040a)
  • Raise minimum required @mui/x-data-grid to v6, remove some peer deps (44e2605)

8.3.1 (2024-04-22)

Bug Fixes

  • Loosen peer dependency requirements for MUI 5 (a8456d6)

8.3.0 (2024-04-03)

Features

  • Add averageLineXLabelUnit optional prop to ScatterPlot (068cf50)
  • Add in defaultProp for averageLineXLabelUnit (3ec496c)

8.2.0 (2024-04-02)

Bug Fixes

  • Add storybook entry for yAxisLabelTypographyProps (074e747)
  • Export DLS_COMPONENT_SLOT_NAMES constant (cd1870c)
  • Update snapshot tests (94f12f6)
  • Update snapshot tests (d0a86ac)
  • Update themeAct and themeEncourage with defaultProps for the BarChart component (6f71b13)

Features

  • Add barTextColors + innerBarTextColor optional props to OverlappedBarChart (62c10e0)
  • Add scatterLabelColor and label props for average line labels as optional props in ScatterPlot (0ea3795)
  • Add titleText slot to PieChart (3ef496f)
  • Add tooltipText slot for StackedBarChart (3225993)
  • Capitalize OverlappedBarChart tooltips (39b4416)
  • Create a barLabels slot for OverlappedBarChart component and apply to EncouraClassic theme (a9faa66)
  • Create Bar Chart slot for yAxisLabel and update Encoura theme with appropriate styleOverride (af8cf6a)
  • Create DLS_COMPONENT_SLOT_NAMES constant (7a54e84)
  • Create pieLegendLabel slot and chartLegendTextFontSize optional prop for PieChart (ea20a3b)
  • Create scatterLabels slot for ScatterPlot (700edf8)
  • Create scatterToolTipLabel and scatterToolTipText sclots for ScatterPlot (53ee14c)
  • Create yAxisLabelTypographyProps prop for BarChart (7bebb0a)
  • Remove hardcoded styling from AreaChart and update Encoura Classic default props for AreaChart (8242cce)
  • Remove hardcoded styling in LineChart and update other themes default props (86acc9b)
  • Remove hardcoded styling in StackedBarChart and update themes with defaultProps (2512f7a)
  • Remove hardcoded XAxis styling in AreaChart and update Encoura Classic themes default props (84a34af)
  • Remove hardcoded XAxis styling in BarChart and update other themes with defaultProps (e899d5c)
  • Update themeEncouraClassic with ScatterPlot default props and style overrides (04909a5)

8.1.0 (2024-03-27)

Features

  • Expose more props on AlertContextProvider to better control snackbar alerts (7d2aa17)

8.0.0 (2024-03-22)

Bug Fixes

  • Alphabetize AreChart props (5eb5020)
  • Alphabetize imports (b5de86f)
  • Alphabetize inner components for Scatterplot (49837af)
  • Alphabetize MapProps (ca85f51)
  • Alphabetize OverlappedBarChart props (f26182b)
  • Alphabetize OverlappedLabel inner component props (019d5a0)
  • Alphabetize PieChart inner components props (ff8bf9c)
  • Alphabetize PieChart props (5777ad6)
  • Alphabetize ScatterPlot props and fix coordenates typo (d9bb9d6)
  • Alphabetize SCFMap props (8d705aa)
  • Alphabetize StateMap props (08a2fb6)
  • Fix import issue with icons in RankSummary component (d061222)
  • Fix loading of museo-sans font in storybook (88927c3)
  • Handle showAvarageLine prop typo in Scatterplot (724cf9a)
  • Load mapbox css (36f0d71)
  • Remove reference to customColors on ENCOURA theme (c06f647)
  • Start to add customizeFillColor prop to AreaChart (27ac4d3)

Features

  • Add in AreaChart storybook entry for large data sets (068dd91)
  • Add support for ENCOURA theme in ThemeProvider (8374971)
  • Add support for storybook env vars, mapbox token (d01c0c7)
  • Add themeMyEncoura and related files to styles dir (f5d8c28)
  • Add Top N Average values to referenceLine label value in Scatterplot (1e03cc5)
  • Added AreaChart component and recharts dependency (1e8869a)
  • Added BarChart component (329899e)
  • Added CountyMap, MapPopup components (808153d)
  • Added DEFAULT_CHART_COLORS constant as a fallback for charts (868d073)
  • Added DLS v7 to v8 migration guide (a92b5b1)
  • Added GeomarketMap component (643781c)
  • Added HeatMap component (28fe7ed)
  • Added LineChart component (d3fdf6d)
  • Added Map component (7be6371)
  • Added OverlappedBarChart component (92d1ac1)
  • Added PieChart component (8ab6ca3)
  • Added ScatterPlot component (4d5b596)
  • Added SCFMap component (d5f4686)
  • Added StackedBarChart component (0a11422)
  • Added StateMap component (5b71f01)
  • Bump deps and devDeps to their latest compatible releases (358bbfb)
  • Bump MUI to 5.15.14 (1829160)
  • Convert colors prop from object type to array so user doesnt need to specify keys (d997382)
  • Create customDims and Typography file and update ReadMe with new theme information (e78ec37)
  • Fix typescript issues for new theme addition (f4c426f)
  • Register DlsAreaChart as a themeable component in the design system (0cc2a03)
  • Register DlsBarChart as a themeable component in the design system (fc84e87)
  • Register DlsHeatMap as a themeable component in the design system (cc6f477)
  • Register DlsLineChart as a themeable component in the design system (57db845)
  • Register DlsMap as a themeable component in the design system (9c32c4a)
  • Register DlsOverlappedBarChart as a themeable component in the design system (8789352)
  • Register DlsPieChart as a themeable component in the design system (0372d81)
  • Register DlsScatterPlot as a themeable component in the design system (69ba843)
  • Register DlsStackedBarChart as a themeable component in the design system (78b9b83)
  • Remove customFillColor prop and use colors prop to customize chart colors (89b5247)

BREAKING CHANGES

  • Out of an abundance of caution, we are shipping DLS8 as a new major release since it contains lots of new components (and therefore, new dependencies)

8.0.0-next.3 (2024-03-22)

Bug Fixes

  • Fix import issue with icons in RankSummary component (d061222)

8.0.0-next.2 (2024-03-21)

Bug Fixes

  • Alphabetize AreChart props (5eb5020)
  • Alphabetize inner components for Scatterplot (49837af)
  • Alphabetize MapProps (ca85f51)
  • Alphabetize OverlappedBarChart props (f26182b)
  • Alphabetize OverlappedLabel inner component props (019d5a0)
  • Alphabetize PieChart inner components props (ff8bf9c)
  • Alphabetize PieChart props (5777ad6)
  • Alphabetize ScatterPlot props and fix coordenates typo (d9bb9d6)
  • Alphabetize SCFMap props (8d705aa)
  • Alphabetize StateMap props (08a2fb6)
  • Handle showAvarageLine prop typo in Scatterplot (724cf9a)

Features

  • Add Top N Average values to referenceLine label value in Scatterplot (1e03cc5)

8.0.0-next.1 (2024-03-21)

Features

  • Added DLS v7 to v8 migration guide (a92b5b1)

BREAKING CHANGES

  • Out of an abundance of caution, we are shipping DLS8 as a new major release since it contains lots of new components (and therefore, new dependencies)

7.8.0-next.6 (2024-03-21)

Features

  • Register DlsHeatMap as a themeable component in the design system (cc6f477)
  • Register DlsMap as a themeable component in the design system (9c32c4a)

7.8.0-next.5 (2024-03-21)

Features

  • Register DlsBarChart as a themeable component in the design system (fc84e87)
  • Register DlsLineChart as a themeable component in the design system (57db845)
  • Register DlsOverlappedBarChart as a themeable component in the design system (8789352)
  • Register DlsPieChart as a themeable component in the design system (0372d81)
  • Register DlsScatterPlot as a themeable component in the design system (69ba843)
  • Register DlsStackedBarChart as a themeable component in the design system (78b9b83)

7.8.0-next.4 (2024-03-21)

Features

7.8.0-next.3 (2024-03-21)

Bug Fixes

  • Alphabetize imports (b5de86f)
  • Remove reference to customColors on ENCOURA theme (c06f647)
  • Start to add customizeFillColor prop to AreaChart (27ac4d3)

Features

  • Add in AreaChart storybook entry for large data sets (068dd91)
  • Added DEFAULT_CHART_COLORS constant as a fallback for charts (868d073)
  • Convert colors prop from object type to array so user doesnt need to specify keys (d997382)
  • Register DlsAreaChart as a themeable component in the design system (0cc2a03)
  • Remove customFillColor prop and use colors prop to customize chart colors (89b5247)

7.8.0-next.2 (2024-03-07)

Bug Fixes

  • Fix loading of museo-sans font in storybook (88927c3)
  • Load mapbox css (36f0d71)

Features

  • Add support for ENCOURA theme in ThemeProvider (8374971)
  • Add support for storybook env vars, mapbox token (d01c0c7)
  • Added AreaChart component and recharts dependency (1e8869a)
  • Added BarChart component (329899e)
  • Added CountyMap, MapPopup components (808153d)
  • Added GeomarketMap component (643781c)
  • Added HeatMap component (28fe7ed)
  • Added LineChart component (d3fdf6d)
  • Added Map component (7be6371)
  • Added OverlappedBarChart component (92d1ac1)
  • Added PieChart component (8ab6ca3)
  • Added ScatterPlot component (4d5b596)
  • Added SCFMap component (d5f4686)
  • Added StackedBarChart component (0a11422)
  • Added StateMap component (5b71f01)
  • Bump deps and devDeps to their latest compatible releases (358bbfb)

7.8.0-next.1 (2024-03-04)

Features

  • Add themeMyEncoura and related files to styles dir (f5d8c28)
  • Create customDims and Typography file and update ReadMe with new theme information (e78ec37)
  • Fix typescript issues for new theme addition (f4c426f)

7.7.0 (2024-02-22)

Bug Fixes

  • Remove unnecessary vscode/settings.json change (5918d43)
  • Update Readme with instructions on how to implement museo sans downstream (4b1f3d0)
  • Update Readme with Museo Sans font information (2a55682)
  • Update snapshot tests (3be8179)
  • Update snapshot tests (2c70631)
  • Update themeEncouraClassics font family reference to Museo Sans to match the documentation (39de919)

Features

7.6.3 (2024-02-06)

Bug Fixes

  • Fix duplicate import (7ac17bd)
  • Minor config fixes (d869537)
  • Update the build process to allow for local installs (c78baa9)

7.6.2 (2024-02-06)

Bug Fixes

  • Change H5 font size for small screen sizes (95586f0)

7.6.0 (2024-01-26)

Features

  • Adds theme custom shadows (12a9be1)

7.5.1 (2024-01-09)

Bug Fixes

  • Adds back fontWeight to some breakpoints (ffea563)
  • Fixes font weight overriding preexisting font weights (06b9146)

7.5.0 (2023-11-30)

Bug Fixes

  • ENCS-4466 Fixed breakpoints and addressed comments (c48a197)

Features

  • Encourage response font sizes (cb84f03)

7.4.0 (2023-10-11)

Features

  • Add colors to Encourage for more flexability (293597d)

7.3.0 (2023-07-28)

Features

  • Added support for HTML content in snackbar alerts (f7af0fa)

7.2.3 (2023-07-24)

Bug Fixes

  • Adjust MUI peer deps to proper versions (a2eca17)

7.2.2 (2023-07-20)

Bug Fixes

7.2.1 (2023-05-02)

Bug Fixes

  • Upgraded npm deps to their latest compatible releases (233df06)

7.2.0 (2023-04-20)

Features

  • Adding more Autocomplete stories (32180bc)

7.1.1 (2023-04-18)

Bug Fixes

  • Fix type issue with SvgIcon on EmptyState component (8a9004a)
  • Migrate Storybook 6 code to Storybook 7 (326f34b)

7.1.0 (2023-04-14)

Bug Fixes

Features

  • Added palette visualizer (7c040e8)
  • Added shadows visualizer (9ca13bb)
  • Added shape visualizer (891588b)
  • Added spacing visualizer (97a34b9)
  • Added typography visualizer (39d870f)
  • Render palette options in smaller groups for improved readability (4039d0b)

7.0.1 (2023-03-16)

Bug Fixes

  • Remove helpers/tests from exports to remove deps (75468d0)

7.0.0 (2023-03-16)

Bug Fixes

  • Export ThemeCustomizations type from each theme file (285c9ca)
  • Fix missing exports (1338315)
  • Update to current MDX extension (d127977)

Features

  • Add Encourage E4S theme (work in progress) (1a57c41)
  • Add spacingPx to all themes (0039309)
  • Better tree shaking support (0697936)
  • Enable github actions and standard-release (81238fb)
  • Encourage theme tweaks based on latest E4S (96a5346)
  • Migrate from babel build to es6 build for better tree shaking (6660657)
  • Migrate MUI stories to CSF V3 format (257c9d6)
  • Remove custom colors from themes and move into palette on existing themes (f5a2d55)

BREAKING CHANGES

  • Breaking changes to the theme creation format and the module output

7.0.0-next.4 (2023-03-16)

Bug Fixes

  • Export ThemeCustomizations type from each theme file (285c9ca)
  • Fix missing exports (1338315)

7.0.0-next.3 (2023-03-13)

Features

  • Encourage theme tweaks based on latest E4S (96a5346)

7.0.0-next.2 (2023-03-13)

Features

  • Add spacingPx to all themes (0039309)

7.0.0-next.1 (2023-02-17)

Bug Fixes

  • Update to current MDX extension (d127977)

Features

  • Add Encourage E4S theme (work in progress) (1a57c41)
  • Better tree shaking support (0697936)
  • Enable github actions and standard-release (81238fb)
  • Migrate from babel build to es6 build for better tree shaking (6660657)
  • Migrate MUI stories to CSF V3 format (257c9d6)
  • Remove custom colors from themes and move into palette on existing themes (f5a2d55)

BREAKING CHANGES

  • Breaking changes to the theme creation format and the module output

6.3.0 (2022-12-02)

Features

  • Bump npm packages to their latest compatible releases (12321f7)

6.2.0 (2022-11-01)

Features

  • Upgrade NPM deps to their latest compatible releases (00e7861)

6.1.2 (2022-08-31)

Bug Fixes

  • Fix 'Select' component playground not interacting well with 'multiple' control (9f0e9ae)

6.1.1 (2022-07-14)

Bug Fixes

  • React runtime build (4a9fa81)
  • Update Confirm Story imports and storybook warnings (08e9859)

6.0.5 (2022-07-14)

6.1.0 (2022-07-14)

Features

  • Add Confirmation Dialog component (7c43699)

Bug Fixes

  • Confirmation hook multiple fires and API organization (9531207)
  • Remove story types from build (3d1b80b)

6.0.4 (2022-07-05)

6.0.3 (2022-06-29)

6.0.2 (2022-06-29)

6.0.1 (2022-05-31)

⚠ BREAKING CHANGES

  • mui 5 and mui 4 are incompatible
  • mui 5 no longer uses JSS but emotion

  • chore(release): 6.0.0-alpha.0

  • chore: Add release scripts

  • chore: Fix labs peer dep

  • chore(release): 6.0.0-alpha.1

  • chore: Cleanup typography settings after migration

  • chore(release): 6.0.0-alpha.2

  • chore: Clean up babel build overrides

  • chore(release): 6.0.0-alpha.3

  • chore: Clean up act theme fix babel remaps and config inheritance

  • chore(release): 6.0.0-alpha.4

  • chore: Refactor styled engine provider location

  • chore: Fix styled-engine peerDep

  • chore(release): 6.0.0-alpha.5

  • chore: Use rem for typography spacing

  • chore(release): 6.0.0-alpha.6

  • chore: Update snap

  • chore: Clean ui mui stories and update tests

  • chore(release): 6.0.0-alpha.7

  • chore: Update lock file

  • chore(release): 6.0.0-alpha.8

  • chore: NPM package upgrades

  • test: Update tests

  • test: Fix all tests

  • fix: Rename story names

  • feat: Remove deprecated components

  • refactor: Rename FormInputGroups to GridGenerator

  • feat: Added status badges, documentation cleanup

  • chore: Documentation cleanup

  • refactor: Migrate styling from JSS to emotion

  • fix: Remove @mui/styles dep

  • chore: Updated packages

  • test: Fix tests

  • fix: Fix issues with React 18 upgrade

  • docs: Remove versions from install command since we are compatible with latest

  • docs: Fix versions

  • docs: Fix dev guide for mui5

  • chore(release): 6.0.0-alpha.9

  • fix: Import classes directly to fix downstream module issues

  • chore(release): 6.0.0-alpha.10

  • fix: Import StyledEngineProvider from main package

  • chore(release): 6.0.0-alpha.11

  • fix: Fix import of StyledEngineProvider

  • chore(release): 6.0.0-alpha.12

  • docs: Minor doc improvements

  • chore: Fix storybook publish command

  • fix: Do not import colors on private path

  • chore(release): 6.0.0-alpha.13

  • build: Prep for release

  • chore(release): 6.0.0

  • build: Prep for release

  • chore(release): 6.0.0

  • build: Prep for release

  • chore(release): 6.0.0

Co-authored-by: Justin Watkins justin.watkins@act.org

Features

  • Replace ACT logo with ACT|Encoura lockup logo (#40) (4e18c14)
  • Migrate to MUI5, Add Support for React 18 (#75) (13528a5), closes #75

6.0.0-alpha.13 (2022-05-31)

Bug Fixes

  • Do not import colors on private path (d21b426)

6.0.0-alpha.12 (2022-05-26)

Bug Fixes

  • Fix import of StyledEngineProvider (77cd478)

6.0.0-alpha.11 (2022-05-26)

Bug Fixes

  • Import StyledEngineProvider from main package (a2e489f)

6.0.0-alpha.9 (2022-05-24)

Features

  • Added status badges, documentation cleanup (19a6207)
  • Remove deprecated components (232d221)

Bug Fixes

  • Fix issues with React 18 upgrade (795c361)
  • Remove @mui/styles dep (eab73de)
  • Rename story names (913d10c)

6.0.0-alpha.8 (2022-05-20)

Features

  • Replace ACT logo with ACT|Encoura lockup logo (#40) (4e18c14)

6.0.0-alpha.7 (2022-04-05)

6.0.0-alpha.6 (2022-04-04)

6.0.0-alpha.5 (2022-04-01)

6.0.0-alpha.4 (2022-04-01)

6.0.0-alpha.3 (2022-03-31)

6.0.0-alpha.2 (2022-03-09)

6.0.0-alpha.1 (2022-03-04)

6.0.0-alpha.0 (2022-03-02)

⚠ BREAKING CHANGES

  • mui 5 and mui 4 are incompatible
  • mui 5 no longer uses JSS but emotion

Features

  • Documentation and Working build for mui-5 upgrade (be6662e)
  • Material UI 5 support (36c942e)
  • Mui 5 functional themes, cleaned up Mui storybook examples (2ae784b)

[v5.12.3] - May 19, 2022

  • Moved @material-ui/core, @material-ui/data-grid, and @material-ui/lab to the devDependencies section of package.json, since they are peer dependencies. This allows the downstream project to choose the exact versions of these packages that they would like to use. Any 4.x version should suffice!

[v5.12.3] - May 19, 2022

  • Moved @material-ui/core, @material-ui/data-grid, and @material-ui/lab\ to the devDependencies section of package.json, since they are peer dependencies. This allows the downstream project to choose the exact versions of these packages that they would like to use. Any 4.x version should suffice!

[v5.12.1] - Mar 09, 2022

  • Improved the TypeScript definition of the titleTypographyProps prop on the <EmptyState /> component.

[v5.12.0] - Mar 09, 2022

  • Added new optional props to the EmptyState component
    • descriptionTypographyProps
    • iconProps
    • titleTypographyProps
  • Improved the styling of the EmptyState title so that this component looks good across all themes.

[v5.11.1] - Feb 28, 2022

  • Upgraded most of the NPM dependencies and dev-dependencies to their latest compatible releases.

[v5.11.0] - Jan 20, 2022

  • Added a new color option, customColors.tertiary.main, to all themes.
    • Material UI v4 does not support the "tertiary" keyword on the palette, so this was implemented through customColors instead.
  • Updated the palette.secondary.dark color on the ENCOURA_DATALAB theme to #003359.

[v5.10.1] - Jan 20, 2022

  • Enable more flexibility on the react version used by downstream projects by moving react and react-dom to dev dependencies.

[v5.10.0] - Jan 13, 2022

  • Added a new theme, ENCOURA_DATALAB, to the DLS. This theme is representative of one of Encoura's product lines.
  • Minor improvements and bug fixes for the ACT_ET theme.
  • Added more stories to the Storybook.

[v5.9.0] - Dec 06, 2021

  • New component: <TablePaginationActions />
    • Useful for paginating large lists and tables
  • Enhanced <DataTable /> component with <TablePaginationActions /> and optional props to support server-side pagination:

      limit?: number;
      offset?: number;
      onChangeLimit?: (limit: number) => void;
      onChangeOffset?: (offset: number) => void;
      rowsPerPageOptions?: number[];
      totalCount?: number;

[v5.8.1] - Nov 03, 2021

  • Bind this to addError in AlertContext.

[v5.8.0] - Nov 03, 2021

  • Added a new helper: getErrorMessage
  • Added new action for AlertContext: addError.

[v5.7.0] - Nov 01, 2021

  • Updated the ACT_ET theme to produce cleaner text inputs and dropdowns when using Material UI's <TextField /> component.
  • Updated the documentation for <FormInputGroups /> to use <TextField /> under the hood, since this is now the preferred way to add inputs to your app.

[v5.6.0] - Nov 01, 2021

  • Added a new helper: oxfordCommaJoin

[v5.5.2] - Aug 06, 2021

  • Added useLocalStorage hook, which replaces the NPM package react-use-localstorage.

[v5.5.1] - July 29, 2021

  • Fixes the ReferenceError: regeneratorRuntime is not defined exception in AlertContext.

[v5.5.0] - July 28, 2021

  • Added <SnackbarAlert /> component, which is an enhanced <Alert /> component that can transition on and off of the screen.
  • Added AlertContext (React Context) to queue and manage the display of multiple SnackbarAlerts at the same time. Downstream apps should use the provided AlertContext to programmatically trigger alerts, rather than using SnackbarAlert directly. Example below!
// APP SETUP:
import AlertContextProvider from '@actinc/dls/context/AlertContext/provider';

const Root: React.FC = (): React.ReactElement<any> => (
  <AlertContextProvider
    anchorOriginHorizontal="right" // optional
    anchorOriginVertical="bottom" // optional
    maxSnack={5} // optional
  >
    <MyApp />
  </AlertContextProvider>
);
// COMPONENT USAGE:
import { AlertContext } from '@actinc/dls/context';

const MyComponent: React.FC = (): React.ReactElement<any> => {
  const { actions } = React.useContext(AlertContext);

  return (
    <span
      onClick={async (): Promise<void> => {
        await actions.addAlert({
          message: 'Some error message',
          options: {
            variant: 'error',
          },
        });
      }}
    >
      Click Me
    </span>
  );
};

[v5.4.0] - July 27, 2021

  • Lots of CSS improvements for the <DataGrid /> component on the ACT_ET theme
  • Revamped the <DataTable /> component as a simpler alternative to <DataGrid />
    • All styles are now pulled from the Material UI theme
    • Introduced a new color: 'default' | 'primary' | 'secondary' prop
      • BREAKING STYLE CHANGE: Previously, the default color treatment was primary (blue header row). The new default color treatment is default (grey header row).
  • Fixed some style issues with the <Switch /> and <Badge /> components in the ACT_ET theme
  • Fixed some minor style issues with the <AppBarNavigation /> component
  • We are no longer exporting the some components that were previously marked as V3 / Deprecated:
    • <TableCellHead />
    • <TableCellBody />
    • <TableContainer />

[v5.3.0] - July 23, 2021

  • Added <IdleTimer /> utility
    • Monitors keyboard and mouse activity to determine when the user has gone idle.
  • Added <DialogContinueSession /> molecule
    • Used to prompt the user to continue their current session. If the user does not choose to continue their session by the provided date, the user's session will expire.
  • Added <SessionTimer /> organism
    • Combines two IdleTimers with the DialogContinueSession component in order to fully and effectively manage the user's session.

[v5.2.0] - July 22, 2021

  • NPM package updates (@material-ui/core -> ^4.12.1)
  • Added <SessionStorageKeySharer /> utility component which allows a newly-opened tab to obtain a key:value pair from the Session Storage of another tab.
    • This is useful if you are storing your application's auth token in Session Storage and want to allow your users to open your app in another tab without having to re-authenticate.
    • The implementation was inspired by this blog post.
    • Note: Since this component makes use of Session Storage and Local Storage, this component is only meant to be rendered in the browser context. SSR apps should not use Session Storage for key/value pairs that are critical to the render (such as the user's auth token).

[v5.1.0] - June 15, 2021

  • Updated <FormSelect /> component to allow options to be disabled. (Pull Request)

[v5.0.0] - June 07, 2021

  • With this release, the DLS will no longer export components that you can import directly from Material UI, such as <Button /> and <Link />.
  • In almost all cases, there is no functional/stylistic difference between importing a MUI component from the DLS vs. MUI. The only exception is with the <Link /> component, as the MUI Link component does not accept a to prop.
  • Removed COLORS and DIMS constants. All DLS components are now powered by the theme engine.
  • Renamed the following components:
    • Renamed <DataTablePrimary /> to <DataTable />
    • Renamed <LoadingPrimary /> to <Loading />
    • Renamed <TableContainerPrimary /> to <TableContainer />
  • Re-instated, and marked as deprecated, the following v3 components to help with reverse compatibility / application migration. These components should be removed when they have suitable alternatives that are powered by the MUI themeing engine:
    • <FormInputPrimary />
    • <FormSelectPrimary />
    • <InputLabelPrimary />
    • <InputPrimary />
    • <SelectPrimary />
    • <SelectSecondary />

[v4.1.0] - May 25, 2021

[v4.0.0] - April 01, 2021

  • The DLS has been completely rebuilt on top of the Material UI theme engine.
    • There are two UI themes that are provided out of the box: ACT and ACT_ET.
    • Refer to the README for usage instructions and more details.

[v3.1.0] - March 05, 2021

  • This package is now open source! Available on NPM at @actinc/dls
  • Check the README.md file for slightly modified installation and usage instructions

[v3.0.0] - January 06, 2021

This release improves the ability for developers to extend / override DLS components within their downstream applications.

Previously, the DLS styles were defined in a rigid manner, such that when you would send in a custom classes prop with some custom styles, these styles would replace the default styling of the component, rather than extend / compliment it.

To that end, v3 components will now extend their default styling when a custom classes prop is supplied.

Furthermore, we have introduced a new mergeClasses helper function -- the brains behind the new style merging behavior -- since this is a useful utility for downstream apps as well.

Here's an example of how you can use mergeClasses to help create your own component variants that are based on Material UI:

import * as React from 'react';
import { Button, ButtonProps } from '@material-ui/core';
import { mergeClasses } from 'act-dls/lib/helpers';

import useStyles from './styles';

type Props = ButtonProps & {
  subject: Subject;
};

const CustomButtonForTestPrep: React.FC<Props> = ({
  classes: classesProp, // allow custom classes/styling to be supplied
  subject,
  ...otherButtonProps
}: Props): React.ReactElement<any> => {
  const classes = useStyles({ subject });

  return (
    <Button
      classes={mergeClasses( // merge the default and custom styles together
        {
          outlined: classes.buttonOutlined,
          root: classes.buttonRoot,
        },
        classesProp, // the custom styles take preference
      )}
      {...otherButtonProps}
    />
  );
};

export default CustomButtonForTestPrep;