chore: 🤖 remove rose radiocard and styles (#1521)
chore: 🤖 remove rose radio card and styles
This commit is contained in:
1 parent
ed9e674823
commit
92db4d4947
11 files changed
+46
-544
No files matched your search
@@ -1,25 +0,0 @@
|
||||
import RoseFormRadioRadioComponent from '../radio';
|
||||
import { deprecate } from '@ember/debug';
|
||||
|
||||
export default class RoseFormRadioCardComponent extends RoseFormRadioRadioComponent {
|
||||
// =attributes
|
||||
layout = this.args.layout;
|
||||
className = `rose-form-radio-card ${this.layout}`;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
deprecate(
|
||||
`Rose Form/Radio/Card component is deprecated, use HDS Form/RadioCard instead. For more info, refer to `,
|
||||
false,
|
||||
{
|
||||
id: 'rose.form.radio.card',
|
||||
until: '4.8.0',
|
||||
for: 'rose',
|
||||
since: {
|
||||
enabled: '3.28.8',
|
||||
},
|
||||
url: 'https://boundary-ui-storybook.vercel.app/?path=/docs/rose-form-radio-radio-card--card',
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
import { Meta, Story, Preview } from '@storybook/addon-docs';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
<Meta title="Rose/Form/Radio/Card" component="RadioCard" />
|
||||
<Meta title="Rose/Form/Radio/Card(removed)" component="RadioCard" />
|
||||
|
||||
# HDS::Form::RadioCard (Recommended)
|
||||
# RadioCard (removed)
|
||||
|
||||
> **_NOTE:_** Replaces the deprecated Rose/Form/Radio/Card.
|
||||
|
||||
Refer to the [HDS Form::RadioCard
|
||||
documentation](https://design-system-components-hashicorp.vercel.app/components/form/radio-card)
|
||||
for a complete overview
|
||||
Rose/Form/Select has been removed in favor of
|
||||
[HDS::Form::RadioCard](https://design-system-components-hashicorp.vercel.app/components/form/radio-card).
|
||||
|
||||
```handlebars
|
||||
<Hds::Form::RadioCard @checked={{true}} as |R|>
|
||||
@@ -44,78 +41,3 @@ export const HDSTemplate = (args) => ({
|
||||
{HDSTemplate.bind({})}
|
||||
</Story>
|
||||
</Preview>
|
||||
|
||||
# Rose/Form/Radio/Card (Deprecated)
|
||||
|
||||
Rose/Form/Radio/Card has been deprecated in favor of [HDS::Form::RadioCard](https://design-system-components-hashicorp.vercel.app/components/form/radio-card)
|
||||
|
||||
### <Rose::Form::Radio::Card> usage:
|
||||
|
||||
# Form Radiofield in a wide format
|
||||
|
||||
Renders a form radiofield in a Wide format.
|
||||
|
||||
```handlebars
|
||||
<Rose::Form::Radio::Card
|
||||
@label='Yes'
|
||||
@error={{false}}
|
||||
@value='yes-agree'
|
||||
@selectedValue='yes-agree'
|
||||
@disabled={{false}}
|
||||
@changed={{fn}}
|
||||
@layout='wide'
|
||||
/>
|
||||
```
|
||||
|
||||
Renders a form radiofield in a tile format.
|
||||
|
||||
```handlebars
|
||||
<Rose::Form::Radio::Card
|
||||
@label='Yes'
|
||||
@error={{false}}
|
||||
@value='yes-agree'
|
||||
@selectedValue='yes-agree'
|
||||
@disabled={{false}}
|
||||
@changed={{fn}}
|
||||
@layout='tile'
|
||||
/>
|
||||
```
|
||||
|
||||
export const Template = (args) => ({
|
||||
template: hbs`
|
||||
<Rose::Form::Radio::Card
|
||||
@label={{label}}
|
||||
@error={{error}}
|
||||
@value={{value}}
|
||||
@selectedValue={{selectedValue}}
|
||||
@disabled={{disabled}}
|
||||
@icon={{icon}}
|
||||
@helperText={{helperText}}
|
||||
@layout={{Layout}}
|
||||
/>`,
|
||||
context: args,
|
||||
});
|
||||
|
||||
<Preview>
|
||||
<Story
|
||||
name="Rose Card"
|
||||
height="10rem"
|
||||
args={{
|
||||
label: 'Azure',
|
||||
error: false,
|
||||
value: 'value and selectedValue must match to select radiofield',
|
||||
selectedValue: 'value and selectedValue must match to select radiofield',
|
||||
helperText: 'Record financial transactions using',
|
||||
disabled: false,
|
||||
}}
|
||||
argTypes={{
|
||||
Layout: {
|
||||
control: 'inline-radio',
|
||||
options: ['wide', 'tile'],
|
||||
name: 'layout',
|
||||
},
|
||||
}}
|
||||
>
|
||||
{Template.bind({})}
|
||||
</Story>
|
||||
</Preview>
|
||||
@@ -8,13 +8,5 @@
|
||||
changed=@changed
|
||||
inline=@inline
|
||||
)
|
||||
card=(component
|
||||
'rose/form/radio/card'
|
||||
name=@name
|
||||
selectedValue=@selectedValue
|
||||
disabled=@disabled
|
||||
changed=@changed
|
||||
layout=@layout
|
||||
)
|
||||
)
|
||||
}}
|
||||
@@ -75,9 +75,9 @@ export const Template = (args) => ({
|
||||
</Story>
|
||||
</Preview>
|
||||
|
||||
# HDS::Form::RadioCard::Group (Recommended)
|
||||
# HDS::Form::RadioCard::Group
|
||||
|
||||
> **_NOTE:_** Replaces the deprecated Rose/Form/Radio/Group/Card.
|
||||
> **_NOTE:_** Replaces the removed Rose/Form/Radio/Group/Card.
|
||||
|
||||
```handlebars
|
||||
<Hds::Form::RadioCard::Group
|
||||
@@ -144,83 +144,3 @@ export const HDSTemplate = (args) => ({
|
||||
{HDSTemplate.bind({})}
|
||||
</Story>
|
||||
</Preview>
|
||||
|
||||
# Rose::Form::Radio::Group::Card (Deprecated)
|
||||
|
||||
```handlebars
|
||||
<Rose::Form::Radio::Group
|
||||
@disabled={{false}}
|
||||
@name={{name}}
|
||||
@selectedValue='disagree'
|
||||
@changed={{fn}}
|
||||
@inline={{false}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<radioGroup.Card
|
||||
@label='Agree'
|
||||
@value='agree'
|
||||
@layout='tile'
|
||||
@helperText='dwsd'
|
||||
/>
|
||||
<radioGroup.Card
|
||||
@label='disagree'
|
||||
@value='disagree'
|
||||
@layout='tile'
|
||||
@helperText='dwsd'
|
||||
/>
|
||||
<radioGroup.Card
|
||||
@label='maybe'
|
||||
@value='maybe'
|
||||
@layout='tile'
|
||||
@helperText='dwsd'
|
||||
/>
|
||||
</Rose::Form::Radio::Group>
|
||||
```
|
||||
|
||||
export const RoseTemplate = (args) => ({
|
||||
template: hbs`
|
||||
<Rose::Form::Radio::Group
|
||||
@disabled={{disabled}}
|
||||
@name={{name}}
|
||||
@selectedValue={{selectedValue}}
|
||||
@changed={{changed}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<radioGroup.card
|
||||
@label={{firstFieldLabel}}
|
||||
@value={{firstFieldValue}}
|
||||
@icon={{firstFieldIcon}}
|
||||
/>
|
||||
<radioGroup.card @label={{secondFieldLabel}} @value={{secondFieldValue}} />
|
||||
</Rose::Form::Radio::Group>`,
|
||||
context: args,
|
||||
});
|
||||
|
||||
<Preview>
|
||||
<Story
|
||||
name="Rose Basic"
|
||||
height="10rem"
|
||||
args={{
|
||||
name: 'mustagree',
|
||||
disabled: false,
|
||||
selectedValue: 'disagree',
|
||||
firstFieldLabel: 'Agree',
|
||||
firstFieldValue: 'agree',
|
||||
secondFieldLabel: 'Disagree',
|
||||
secondFieldValue: 'disagree',
|
||||
firstFieldIcon: 'flight-icons/svg/org-16',
|
||||
}}
|
||||
argTypes={{
|
||||
firstFieldIcon: {
|
||||
control: 'select',
|
||||
options: [
|
||||
'flight-icons/svg/org-16',
|
||||
'flight-icons/svg/clipboard-copy-16',
|
||||
],
|
||||
},
|
||||
changed: { action: 'changed' },
|
||||
}}
|
||||
>
|
||||
{RoseTemplate.bind({})}
|
||||
</Story>
|
||||
</Preview>
|
||||
Reference in new issue
Block a user