Version 16 of Recipe updates the design for EzCheckbox.
This release is a major version release and as such, will require migration steps for applications that currently use Recipe Version 15.x or below.
The following changes are considered breaking changes:
EzCheckboxEzCheckbox has a new design with support for labels, colors, groups, and sizes.
To make it easier to incrementally move over to the new design, users can simply add a legacy tag to their current implementations. The legacy EzCheckbox will be supported through v16, but will be removed in v17.
// old<EzCheckbox label="Vegan" checked={checked} onChange={handleOnChange} />// new<EzFormControlLabelcontrol={<EzCheckbox checked={checked} onChange={handleOnChange} />}label="Vegan"/>// legacy<EzCheckboxlegacylabel="Vegan"checked={checked}onChange={handleOnChange}/>
EzStatusEzStatus was deprecated in v15 in favor of EzChip status variants. Recipe has removed EzStatus as of v16 and as such, any uses of EzStatus will need to be refactored to use EzChip.
// old<EzStatus text="Verified" use="success" size="small" />// new<EzChip label="Verified" variant="success" size="small" />
EzPageContentEzPageContent was deprecated in v1.9.0 in favor of EzPage and is being removed as of v16. All uses of EzPageContent will need to be refactored to use EzPage.
// old<EzPageContent>...</EzPageContent>// new<EzPage>...</EzPage>
EzContentGroupEzContentGroup was deprecated in v1.9.0 in favor of EzLayout and is being removed as of v16. All uses of EzContentGroup will need to be refactored to use EzLayout.
// old<EzContentGroup>...</EzContentGroup><EzContentGroup horizontal>...</EzContentGroup>// new<EzLayout layout="stack">...</EzLayout><EzLayout layout="basic">...</EzLayout>
EzSuperRadioButtonsEzSuperRadioButtons was deprecated in v15 in favor of EzRadio super radio buttons and is being removed as of v16. All uses of EzSuperRadioButtons will need to be refactored to use EzRadio.
// old<EzSuperRadioButtonslabel="Drinks"options={[{label: "Coffee",value: 'coffee',imageSrc: withPrefix('/images/coffee.svg'),},{label: 'Wine',value: 'wine',imageSrc: withPrefix('/images/wine.svg'),},{label: "Water",value: 'water',imageSrc: withPrefix('/images/water.svg'),},]}value={selected}onChange={setSelected}/>// newconst {Coffee, WaterGlass, WineGlass} = require('@ezcater/icons');<EzFormControl><EzFormLabel id="radio-buttons-drinks">Drinks</EzFormLabel><EzRadioGroupariaLabel="radio-buttons-drinks"defaultValue="coffee"name="radio-buttons-drinks-group"onChange={setSelected}rowvalue={selected}><EzFormControlLabelcontrol={<EzRadio />}icon={<EzIcon icon={Coffee} />}label="Coffee"value="coffee"/><EzFormControlLabelcontrol={<EzRadio />}icon={<EzIcon icon={WineGlass} />}label="Wine"value="wine"/><EzFormControlLabelcontrol={<EzRadio />}icon={<EzIcon icon={WaterGlass} />}label="Water"value="water"/></EzRadioGroup></EzFormControl>
EzLabelledItemEzLabelledItem was deprecated in v12.1 in favor of EzLabel and is being removed as of v16. All uses of EzLabelledItem will need to be refactored to use EzLabel.
// old<EzLabelledItem position="left" size="small" htmlFor="headcount">Headcount<input id="headcount" placeholder="20 people" /></EzLabelledItem>// new<div><EzLabel position="side" use="secondary" htmlFor="headcount">Headcount</EzLabel><input id="headcount" placeholder="20 people" /></div>
EzField with type="radio" was set to be removed in v16, but has been pushed back to v17 to coincide with the removal of of EzField with type="checkbox", giving users more time to switch over.
You can update your Recipe installation using a package manager like npm or yarn.
npm install @ezcater/recipe@latest
or
yarn upgrade @ezcater/recipe@latest