@forter/radio-button
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.5](https://github.com/forter/web-components/compare/@forter/radio-button@2.1.4...@forter/radio-button@2.1.5) (2019-09-19) | ||
**Note:** Version bump only for package @forter/radio-button | ||
## [2.1.4](https://github.com/forter/web-components/compare/@forter/radio-button@2.1.3...@forter/radio-button@2.1.4) (2019-09-19) | ||
@@ -8,0 +16,0 @@ |
@@ -81,2 +81,3 @@ import { css } from 'lit-element'; | ||
:host([disabled]), | ||
:host([disabled]) #label ::slotted(label) { | ||
@@ -89,10 +90,5 @@ color: var(--fc-radio-disabled-text-color, var(--ftr-cancel-5)); | ||
pointer-events: none; | ||
color: inherit; | ||
} | ||
@media (prefers-reduced-motion: reduce) { | ||
#container { | ||
transition: none; | ||
} | ||
} | ||
:host(:hover:not([disabled])) #container:hover { | ||
@@ -99,0 +95,0 @@ background: var(--fc-radio-button-hover-color, var(--ftr-apply-0)); |
{ | ||
"name": "@forter/radio-button", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "Radio Button and Group from Forter Components", | ||
@@ -58,3 +58,3 @@ "author": "Forter Developers", | ||
}, | ||
"gitHead": "cb4bd2ac6e3727eb43e30dbccec7bdf7ee53efcc" | ||
"gitHead": "0aae1f4ddd21eb0daaab2d0b142f7eb25bd511e1" | ||
} |
import markdown from '../README.md'; | ||
import { boolean, color, withKnobs } from '@storybook/addon-knobs'; | ||
import { boolean, color, text, withKnobs } from '@storybook/addon-knobs'; | ||
import { html } from 'lit-html'; | ||
import { storiesOf } from '@storybook/polymer'; | ||
@@ -10,5 +9,2 @@ import '../src/fc-radio-group'; | ||
const notes = { markdown }; | ||
const options = { selectedPanel: 'storybooks/knobs/panel' }; | ||
/** | ||
@@ -21,9 +17,13 @@ * Generates a spread of story parameters | ||
function defaultRadioButton() { | ||
export function attributes() { | ||
return html` | ||
<fc-radio-button name="food" label="Eggs" value="eggs"></fc-radio-button> | ||
<fc-radio-button | ||
name="${text('name', 'food')}" | ||
label="Eggs" | ||
value="eggs" | ||
></fc-radio-button> | ||
`; | ||
} | ||
function customStyleRadioButton() { | ||
export function customStyles() { | ||
return html` | ||
@@ -51,21 +51,31 @@ <style> | ||
function preSelectedRadioButton() { | ||
export function preselected() { | ||
return html` | ||
<fc-radio-button checked name="food" label="Hamburger" value="hamburger"></fc-radio-button> | ||
<fc-radio-button | ||
checked | ||
name="food" | ||
label="Hamburger" | ||
value="hamburger" | ||
></fc-radio-button> | ||
`; | ||
} | ||
function disabledRadioButton() { | ||
export function disabled() { | ||
return html` | ||
<fc-radio-button disabled name="food" label="Hamburger" value="hamburger"></fc-radio-button> | ||
<fc-radio-button | ||
disabled | ||
name="food" | ||
label="Hamburger" | ||
value="hamburger" | ||
></fc-radio-button> | ||
`; | ||
} | ||
(storiesOf('Controls|Radio Button/Radio Button', module) | ||
.addParameters({ notes, options }) | ||
.addDecorator(withKnobs) | ||
.add('Default', defaultRadioButton) | ||
.add('Custom Style', customStyleRadioButton) | ||
.add('Preselected', preSelectedRadioButton) | ||
.add('Disabled', disabledRadioButton) | ||
); | ||
export default { | ||
title: 'Controls|Radio Button/Radio Button', | ||
decorators: [withKnobs], | ||
parameters: { | ||
notes: { markdown }, | ||
options: { selectedPanel: 'storybooks/knobs/panel' }, | ||
}, | ||
}; |
import markdown from '../README.md'; | ||
import { html, render } from 'lit-html'; | ||
import { storiesOf } from '@storybook/polymer'; | ||
import { color, withKnobs } from '@storybook/addon-knobs'; | ||
const notes = { markdown }; | ||
const options = { selectedPanel: 'storybooks/knobs/panel' }; | ||
import { enumerateProperties } from '../../../lib/storybook-helpers'; | ||
import '../src'; | ||
import { FcRadioGroup } from '../src/FcRadioGroup'; | ||
import '../src/fc-radio-group'; | ||
import '../src/fc-radio-button'; | ||
const story = enumerateProperties(FcRadioGroup); | ||
@@ -23,5 +22,5 @@ /** | ||
function defaultRadioGroup() { | ||
return html` | ||
<fc-radio-group legend="Which is your Favorite?" @select="${onSelect}"> | ||
export function defaultProperties() { | ||
return story(html` | ||
<fc-radio-group legend="Which is your Favorite?"> | ||
<fc-radio-button name="food" label="Eggs" value="eggs"></fc-radio-button> | ||
@@ -31,11 +30,6 @@ <fc-radio-button name="food" label="Hamburger" value="hamburger"></fc-radio-button> | ||
</fc-radio-group> | ||
<dl> | ||
<dt>Selected:</dt> | ||
<dd><output></output></dd> | ||
</dl> | ||
`; | ||
`); | ||
} | ||
function customStyleRadioGroup() { | ||
export function customStyleRadioGroup() { | ||
return html` | ||
@@ -53,3 +47,4 @@ <style> | ||
</style> | ||
<fc-radio-group legend="Which is your Favorite?" @select="${onSelect}"> | ||
${story(html` | ||
<fc-radio-group legend="Which is your Favorite?"> | ||
<fc-radio-button name="food" label="Eggs" value="eggs"></fc-radio-button> | ||
@@ -59,11 +54,8 @@ <fc-radio-button checked name="food" label="Hamburger" value="hamburger"></fc-radio-button> | ||
</fc-radio-group> | ||
<dl> | ||
<dt>Selected:</dt> | ||
<dd><output></output></dd> | ||
</dl> | ||
`)} | ||
`; | ||
} | ||
function preSelectedRadioGroup() { | ||
return html` | ||
export function preSelectedRadioGroup() { | ||
return story(html` | ||
<fc-radio-group legend="Which is your Favorite?" @select="${onSelect}"> | ||
@@ -73,15 +65,12 @@ <fc-radio-button name="food" label="Eggs" value="eggs"></fc-radio-button> | ||
</fc-radio-group> | ||
<dl> | ||
<dt>Selected:</dt> | ||
<dd><output>hamburger</output></dd> | ||
</dl> | ||
`; | ||
`); | ||
} | ||
(storiesOf('Controls|Radio Button/Radio Group', module) | ||
.addParameters({ notes, options }) | ||
.addDecorator(withKnobs) | ||
.add('Default', defaultRadioGroup) | ||
.add('Custom Style', customStyleRadioGroup) | ||
.add('Preselected', preSelectedRadioGroup) | ||
); | ||
export default { | ||
title: 'Controls|Radio Button/Radio Group', | ||
decorators: [withKnobs], | ||
parameters: { | ||
notes: { markdown }, | ||
options: { selectedPanel: 'storybooks/knobs/panel' }, | ||
}, | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76197
1432