- Updated Node.js support to
^14.17.0 || ^16.0.0 || >= 18.0.0
. - Updated the
react
peer dependency to^18.0.0
. - Updated dependencies, some of which require newer Node.js versions than previously supported.
- Use the
node:
URL scheme for Node.js builtin module imports in tests. - Removed the
LinkActive.mjs
module and thenext
optional peer dependency.
- Removed the redundant
react-dom
peer dependency. - Updated dev dependencies.
- Removed the now redundant
next
dev dependency. - Updated ESLint config.
- Simplified Stylelint dev dependencies and config.
- Updated
jsconfig.json
:- Set
compilerOptions.maxNodeModuleJsDepth
to10
. - Set
compilerOptions.module
tonodenext
.
- Set
- Updated GitHub Actions CI config:
- Run tests with Node.js v14, v16, v18.
- Removed the now redundant
not IE > 0
from the Browserslist query. - Updated the package description and keywords to remove mention of Next.js.
- Added
esm
andmjs
package keywords. - Updated
react-dom/server
imports to suit React v18 in tests. - Corrected “Markdown” capitalization in documentation.
- Added a JSDoc description to the React component
Margin
. - Revamped the readme:
- Removed the badges.
- Added information about Deno, import maps, TypeScript config and optimal JavaScript module design.
- Modules for React components with CSS dependencies now have a
css
export that’s aSet
instance containing CSS dependency URLs.
- Updated dev dependencies.
- Updated GitHub Actions CI config.
- Replaced the
List
React component withListOrdered
andListUnordered
React components. - The
WordBreaks
React component now accepts atext
prop instead ofchildren
. - The
Toggle
React component now has a render error if the propinputProps.type
isn’t specified. - Implemented TypeScript types via JSDoc comments.
- Updated dependencies.
- Check TypeScript types via a new package
types
script. - Simplified dev dependencies and config for ESLint.
- Use the
ALLOW_MISSING_COVERAGE
environment variable with the packagetests
script to allow missing code coverage. Tests covering the full React hooks lifecycle can be added in the future. - Added React component HTML snapshot tests using a new
snapshot-assertion
dev dependency. - Fixed the
WordBreaks
React component not returning the original text string when no word breaks are inserted. - Fixed the
Toggle
React component implementation for the propinputProps.className
. - Added a
license.md
MIT License file. - Improved documentation.
- Updated Node.js support to
^12.22.0 || ^14.17.0 || >= 16.0.0
. - Updated dependencies, some of which require newer Node.js versions than previously supported.
- Public modules are now individually listed in the package
files
andexports
fields. - Removed
./package
from the packageexports
field; the fullpackage.json
filename must be used in arequire
path. - Removed the package main index module; deep imports must be used.
- Shortened public module deep import paths, removing the
/public/
. - The API is now ESM in
.mjs
files instead of CJS in.js
files, accessible viaimport
but notrequire
. - Removed the
prop-types
dependency and related functionality:- Removed the
propTypeChildren
package export. - Removed the
propTypes
property from React components.
- Removed the
- More modern JavaScript syntax.
- Removed some CSS vendor prefixes.
- Switched back to using
React.createElement
instead of the the new React JSX runtime.
- Updated the
next
peer dependency to9.0.4 - 12
. - Removed the
@babel/runtime
andobject-assign
dependencies. - Also run GitHub Actions CI with Node.js v17.
- Simplified package scripts.
- Removed the Babel and PostCSS build process.
- Removed conditionality on the Node.js global
process.env.NODE_ENV
. - Made the
LinkActive
andWordBreaks
React components named functions. - Reorganized the test file structure.
- Test the bundle sizes for public modules individually.
- Use a new
assertBundleSize
function to assert module bundle size in tests:- Failure message contains details about the bundle size and how much the limit was exceeded.
- Errors when the surplus is greater than 25% of the limit, suggesting the limit should be reduced.
- Resolves the minified bundle and its gzipped size for debugging in tests.
- Configured Prettier option
singleQuote
to the default,false
. - Documentation tweaks.
- Updated the
next
peer dependency to9.0.4 - 11
. - Updated dev dependencies.
- Renamed imports in the test index module.
- Amended the changelog entries for v6.0.0 and v8.0.0.
- Updated Node.js support to
^12.20 || >= 14.13
. - Updated dependencies, some of which require newer Node.js versions than were previously supported.
- Replaced the the
package.json
exports
field public subpath folder mapping (deprecated by Node.js) with a subpath pattern. Deeprequire
paths withindevice-agnostic-ui/public/
must now include the.js
file extension. - The tests are now ESM in
.mjs
files instead of CJS in a.js
file.
- Reordered package fields.
- Updated the GitHub Actions CI config to run tests with Node.js v12, v14, v16.
- Test the bundle size using
esbuild
instead ofwebpack
anddisposable-directory
. - Updated the documented bundle size.
- Use the
.js
file extension in internalrequire
paths. - Documentation improvements.
- The file
changelog.md
is no longer published.
- Fixed
Select
component arrow styles that were accidentally broken in v7.0.0.
- Replaced
styled-jsx
CSS-in-JS styling with vanilla CSS files, using the BEM class naming convention. The necessary CSS files (depending on the components used) must be manually loaded in your app.
- Made the
next
peer dependency optional via a new packagepeerDependenciesMeta
field. Now React projects without Next.js installed can install this package and use non Next.js related components via deep imports.
- Updated the package description to mention React.
- Updated the package
keywords
field. - Added a
webpack
v5 bundle test, asserting the minified and gzipped size is < 3 kB.
- Updated dependencies.
- Replaced the
babel-eslint
dev dependency with@babel/eslint-parser
. - Updated the Browserslist query to exclude all IE versions from the list of supported browsers.
- Fixed invalid nesting of a HTML
div
element inside abutton
within theButtonSubmit
component. - Use regex
u
mode within the functionsplitWordBreaks
. - Quote CSS
font-family
names containing spaces. - Fixed
Html
component first and last childblockquote
element CSS top and bottom margins. - Fixed
Html
component childol
element first childli
element CSS top margins.
- Updated the
react
andreact-dom
peer dependencies to16.14.0 - 17
. - Updated dependencies, some of which require newer Node.js versions than were previously supported.
- Updated Node.js support from v8.10+ to
^10.17.0 || ^12.0.0 || >= 13.7.0
. - Removed the package
module
field. - Added a package
exports
field with conditional exports to support native ESM in Node.js and keep internal code private, whilst avoiding the dual package hazard. Published files have been reorganized and most are now CJS instead of ESM, so previously undocumented deep imports will need to be rewritten. - Updated the Babel config to use the new JSX transform and removed now redundant
React
requires. - Ensure using the
data-daui-color-scheme
HTML attribute also updates the element’s font color to match the specified color scheme.
- Allow React component
displayName
andpropTypes
to be removed in production builds. - Setup GitHub Sponsors funding:
- Added
.github/funding.yml
to display a sponsor button in GitHub. - Added a
package.json
funding
field to enable npm CLI funding features.
- Added
- Update the
next
peer dependency to9.0.4 - 10
. - Stop using
husky
andlint-staged
. - Stop using
size-limit
temporarily due to ai/size-limit#205. - Use
coverage-node
to enforce 100% code coverage for tests. - Updated GitHub Actions CI config:
- Ensure it also runs on pull request.
- Updated
actions/checkout
to v2. - Updated
actions/setup-node
to v2. - Also test Node.js v14 and v15.
- Simplified config with the
npm install-test
command. - Don’t specify the
CI
environment variable as it’s set by default.
- Use strict mode for scripts.
- Custom Babel plugins now run before and after the
styled-jsx/babel
plugin, to workaround vercel/styled-jsx#680 and vercel/styled-jsx#689. - Improved the package
prepare:prettier
andtest:prettier
scripts. - Reordered the package
test:eslint
script args for consistency withtest:prettier
. - Configured Prettier option
semi
to the default,true
. - Removed
npm-debug.log
from the.gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory. - Updated the
.editorconfig
file.
- Removed peer dependencies from the
ignore
field of.size-limit.json
, as they are ignored by default. - Removed the CSS
align-self: stretch
rule from theLinkCard
component.
- The color scheme can now be set for specific elements using a
data-daui-color-scheme
attribute with alight
ordark
value. This is useful for implementing a global color scheme switch, or to force a legible scheme when UI is overlaying an element known to always be light or dark. - The
Heading
component has new props:level
sets the heading element used, e.g.h1
.size
sets the CSSfont-size
via a global theme CSS variable, e.g.--daui-h1-font-size
.
- Updated dev dependencies.
- Loosened the semver range for the
@babel/runtime
dependency, to avoid duplication innode_modules
in projects using the oldest supported Next.js version. - Reduced the opacity of shadows in dark mode.
- Updated dev dependencies.
- Increased the bundle size limit from 7 KB to 8 KB.
Textbox
componenttype
prop types now also allowdate
,datetime-local
,email
,month
,password
,search
,tel
,time
,url
andweek
values.
- Updated dependencies.
- Updated
stylesSyntaxHighlightingPrism
styles:- Only set the base color on
code
elements (and relevant descendant tokens, as before). - Syntax highlight CSS at-rules.
- Only set the base color on
- The
Heading
component’sh1
element no longer has a default CSSfont-size
rule. AllHeading
uses should have an inline style (orclassName
) that sets afont-size
; using one of the new CSS variables (see below) or a custom value.
- Added new CSS variables for global control of heading font sizes, used by the
Heading
andHtml
components:--daui-h1-font-size
--daui-h2-font-size
--daui-h3-font-size
--daui-h4-font-size
--daui-h5-font-size
--daui-h6-font-size
Html
component childrenh3
,h4
,h5
, andh6
elements are now styled with specificfont-size
rules via the new CSS variables.
- Changelog typo fix.
Picture
component changes:- An
img
element must now be manually declared via thechildren
prop. - It can now accept a
dangerouslySetInnerHTML
prop. - The
alt
,src
, andround
props have been deprecated. - The
width
prop no longer sets a CSS pixelwidth
value on thepicture
element.
- An
- Support
img
elements in theHtml
component, by ensuring they are responsive withmax-width: 100%
andheight: auto
styles.
- Updated dev dependencies.
- Tidied
Toggle
component CSS whitespace. - Set the
Picture
component static and dynamic styles via separatestyle
tags for efficiency. - Reordered
Html
component styles so that thestylesHtml
CSS comes last, indicating higher specificity.
- Updated the
--daui-sans-serif
and-daui-emoji
CSS variable font stacks defined instylesGlobalTheme
, for cross-device consistency. They are now similar to the GitHub font stacks. - Changelog typo fix.
- Updated the minimum supported Node.js version from v8.5 to v8.10, to match ESLint’s level of support.
- Renamed several CSS variables, so that prefixes match the capitalization of the component name:
--daui-nav-
→--daui-Nav-
--daui-scroll-
→--daui-Scroll-
--daui-pre-
→--daui-Pre-
- New font size approach:
Blockquote
,List
, andPara
components now inherit font size.Heading
,Select
andTextbox
components now use%
instead ofrem
for font size units.
- Added a new
splitWordBreaks
utility function andWordBreaks
component, for rendering text with aesthetically pleasing word break opportunities. - Added a new
--daui-spacing
CSS variable, for global control of spacing between elements that are intended to visually align. - Added a new
Margin
component that wraps children in adiv
element, with a margin set via the--daui-spacing
CSS variable. - Added a new optional
active
prop for theLinkText
component, for displaying active state.
- Updated dev dependencies.
- Updated the package
homepage
field. - The
Button
component’sbutton
element’s styles now inheritsfont-variant
. - Added
scrollbar-width: thin
styles toNav
andPre
components. - Updated
LinkNav
andNav
component styles:- The content of links now vertically aligns to the bottom.
- More compact spacing to fit more links into a narrow viewport.
Nav
horizontal inner spacing uses the--daui-spacing
CSS variable, and no longer has extra spacing on the right.
- Updated the
Scroll
component to use a singlediv
element and removed themax-width: 100%
style. - Reordered
Fieldset
component style rules for consistency with other components.
- Ensure the
Picture
component maintains aspect ratio when an inline style width is applied. Also, CSScalc
is used instead of JS math so precision matches the browser’s capability, and for better inspectability.
- The
Html
component no longer renders a string value for thechildren
prop withdangerouslySetInnerHTML
. Instead, use thedangerouslySetInnerHTML
prop directly.
- Added the
stylesSyntaxHighlightingPrism
named export, for styling syntax highlighting HTML produced by Prism. - Added the
propTypeChildren
named export, for use in componentpropTypes
to specify a prop (usually, but not necessarilychildren
) should have a React node type, and if.isRequired
is chained, must be populated unless thedangerouslySetInnerHTML
prop is populated. Blockquote
,Button
,Code
,Html
,LinkCard
,LinkNav
,LinkText
,List
,Nav
,Para
,Pre
,Select
, andTable
components can now accept adangerouslySetInnerHTML
prop.- Additional
Nav
component props are now applied to the underlyingnav
element.
- Updated dependencies.
- Reorganized the files in
src/styles
so that filenames match their named export. - Alphabetically sort exports in index files.
- Fixed setting a
className
prop onLinkCard
andLinkNav
components from interfering with theactive
class. - The
children
prop of theNav
andTable
components is now marked as required inpropTypes
. - In many components, use the new
propTypeChildren
API. - In many components, use
classNameProp
fromclass-name-prop
for creating aclassName
prop value for multiple classes. - Improved the readme with deviceagnosticui.com links, an expanded intro with a list of features, better setup instructions, and a new “API” section.
- Updated dependencies.
- Fixed
<Nav>
and<Pre>
component:focus
styles. - Only display
<Nav>
,<Pre>
and<Scroll>
component scroll hint shadows in browsers that supportoverscroll-behavior-x: contain
(as they look bad when overscrolled) and not-webkit-overflow-scrolling: touch
(due to a WebKit bug). This affects mostly Safari desktop and iOS. - Use Use
rem
units for scroll shadow styles. - Removed
package-lock.json
from.gitignore
and.prettierignore
, as it’s disabled in.npmrc
anyway.
Initial release.