v4.0.0
·
386 commits
to development
since this release
Adds
- Adds the
useResponsiveSpacinghook. - Adds docs for
Responsive GridStyle Guide. - Consolidates message variants, sizes, highlight colors, and background colors arrays into shared constants
- Adds v4 Migration Guide to Storybook.
- Adds docs for
Using Next.js Image componentDevelopment Guide.
Updates
- Updates
Templatecomponent(s) and styles per TAD. - Updates the values for the breakpoints and the associated docs.
- Updates the
viewportpreview options in Storybook to align with the Reservoir breakpoints. - Updates the Storybook font styles.
- Updates the docs for the
Templatecomponent. - Replaces the error thrown with a console.warn for the
Breadcrumbs,Heading, andImagecomponents. - Removes props with HTML equivalents and instructs devs to use the native attributes
- Updates the grid layout of the content for the
Hero"primary"variant. - Changes the names of theme objects that conflict with Chakra's base names from
CustomtoReservoirfor consistency. This impacts theme objects forBreadcrumbs,Button,Select,Slider, andTable. - Replaces positional function args with object references in utility functions/components when there are 3 or more arguments.
- Updates
Table'stableTextSizeprop to acceptcaption. - Renames
Accordion,Banner,Breadcrumbs,Button,Hero,Icon,Link,List,Modal,Notification,Select,StatusBadge,TagSet, andTextInputprops using "type" to use "variant". - Updates the
idprop for all components to reduceundefinedand makes previously requiredids optional in the following components:Accordion,Button,ButtonGroup,Checkbox,CheckboxGroup,DatePicker,Fieldset,Form,MultiSelect,MultiSelectGroup,ProgressIndicator,Radio,RadioGroup,SearchBar,Slider,TextInput,Toggle - Moves up the
...restprop spread statement to the parent element in every component. - Updates how the
classNameprop is used in components. They are no longer explicit internal props but can be passed as other props through therestprop. - Updates internal
classNamevalues to use theds-[componentName]naming convention. - Updates
README.mdfor v4 - Update Storybook URL for v4
Removals
- Removes the NYPL Header component.
- Removes the following deprecated props and typed and style values:
Button'slinkvalue inbuttonTypesArrayHeading's "primary", "secondary", "tertiary", "callout" sizesHeading's "one", "two", "three", "four", "five", "six" levelsHero's "secondary", "secondaryBooksAndMore", "secondaryLocations", "secondaryResearch", "secondaryWhatsOn", "fiftyFifty" typesIcon'sIconRotationTypestypeLink'sbuttonvalue inlinkTypesArrayNotifications'noMarginprop; this is now the default styleProgressIndicator'sdarkModepropStatusBadge's "low", "medium", "high" values fromstatusBadgeTypeArrayStatusBadge'slevelpropStyledList's "tag", "mini" values intextSizesArray
- Removes
role="search"fromSearchbarwrapper. - Removes use of
useNYPLBreakpointshook inFilterBarInlineandMultiSelectGroup. - Removes
isDarkModefunction fromSliderandAccordion. - Removes
useNYPLBreakpointsfrom final component,SearchBar, and removesmediaMatchMockfrom test setup since it is no longer necessary. - Removes explicit
classNameandchildrenprops in favor of expanded prop type definitions in all components. - Removes the use of the
window'sscrollIntoViewdependency in theTabscomponent. - Removes the
tableTextSizeprop from theTablecomponent in favor of using the nativefontSizeCSS prop. - Removes
Children.maplogic fromButton,ButtonGroup,Card,CheckboxGroup,List,RadioGroup, andTooltipto reduce complexity and improve performance. - Removes warnings validating presence or type of children from
SubNav,ComponentWrapper,Form,Heading,Icon,Logo, andText. - Removes the
FilterBarcomponent anduseFilterBarhook. - Removes
noSpaceprop from Heading component. - Removes
noSpaceprop from Text component. - Removes default spacing values set on the
DatePicker,Heading,HelperErrorText,HorizontalRule,Label,List,StyledList, andTextcomponents. - Removes all files related to the
Autosuggestcomponent guidelines. - Removes the exported
TagSetTypePropstype. - Removes
.mdxtypeDOM children logic check inCard,Form,Icon, andTabscomponents. - Removes the
useWindowSizeanduseCarouselStyleshooks.
Fixes
- Fixes missing names for some component story code blocks.