refactor(mode): remove windows mode entirely

This commit is contained in:
Brandy Carney
2017-11-15 13:41:21 -06:00
parent dd5ff40993
commit f8ba900ebe
97 changed files with 134 additions and 5363 deletions

View File

@ -63,8 +63,7 @@ import { SegmentButtonEvent } from '../../index';
tag: 'ion-segment',
styleUrls: {
ios: 'segment.ios.scss',
md: 'segment.md.scss',
wp: 'segment.wp.scss'
md: 'segment.md.scss'
},
host: {
theme: 'segment'
@ -90,10 +89,10 @@ export class Segment {
/**
* @input {string} The mode determines which platform styles to use.
* Possible values are: `"ios"`, `"md"`, or `"wp"`.
* Possible values are: `"ios"` or `"md"`.
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
*/
@Prop() mode: 'ios' | 'md' | 'wp';
@Prop() mode: 'ios' | 'md';
/*
* @input {boolean} If true, the user cannot interact with the segment. Default false.

View File

@ -1,128 +0,0 @@
@import "../../themes/ionic.globals.wp";
@import "./segment";
// Windows Segment
// --------------------------------------------------
/// @prop - Background of the segment button
$segment-button-wp-background-color: transparent !default;
/// @prop - Text color of the activated segment button
$segment-button-wp-text-color-activated: $toolbar-wp-text-color !default;
/// @prop - Padding top of the segment button
$segment-button-wp-padding-top: 0 !default;
/// @prop - Padding end of the segment button
$segment-button-wp-padding-end: 6px !default;
/// @prop - Padding bottom of the segment button
$segment-button-wp-padding-bottom: $segment-button-wp-padding-top !default;
/// @prop - Padding start of the segment button
$segment-button-wp-padding-start: $segment-button-wp-padding-end !default;
/// @prop - Height of the segment button
$segment-button-wp-height: 4rem !default;
/// @prop - Line height of the segment button
$segment-button-wp-line-height: 4rem !default;
/// @prop - Font size of the segment button
$segment-button-wp-font-size: 1.3rem !default;
/// @prop - Text transform of the segment button
$segment-button-wp-text-transform: uppercase !default;
/// @prop - Font weight of the segment button
$segment-button-wp-font-weight: bold !default;
/// @prop - Opacity of the segment button
$segment-button-wp-opacity: .5 !default;
/// @prop - Opacity of the activated segment button
$segment-button-wp-opacity-activated: 1 !default;
/// @prop - Opacity of the disabled segment button
$segment-button-wp-opacity-disabled: .3 !default;
/// @prop - Size of an icon in the segment button
$segment-button-wp-icon-size: 2.6rem !default;
/// @prop - Line height of an icon in the segment button
$segment-button-wp-icon-line-height: $segment-button-wp-line-height !default;
/// @prop - Position of the buttons in the segment
$segment-button-wp-buttons-justify-content: flex-start !default;
.segment-wp {
justify-content: $segment-button-wp-buttons-justify-content;
}
.segment-wp .segment-button {
@include padding($segment-button-wp-padding-top, $segment-button-wp-padding-end, $segment-button-wp-padding-bottom, $segment-button-wp-padding-start);
height: $segment-button-wp-height;
font-size: $segment-button-wp-font-size;
font-weight: $segment-button-wp-font-weight;
line-height: $segment-button-wp-line-height;
text-transform: $segment-button-wp-text-transform;
color: $segment-button-wp-text-color-activated;
background-color: $segment-button-wp-background-color;
opacity: $segment-button-wp-opacity;
&.segment-activated {
opacity: $segment-button-wp-opacity-activated;
}
ion-icon {
font-size: $segment-button-wp-icon-size;
line-height: $segment-button-wp-icon-line-height;
}
}
.segment-wp.segment-disabled,
.segment-wp .segment-button-disabled {
opacity: $segment-button-wp-opacity-disabled;
pointer-events: none;
}
.toolbar {
.segment-wp {
@include margin(0, auto);
}
}
// Windows Segment Button Mixin
// --------------------------------------------------
@mixin wp-segment-button($color-name, $color-base) {
.segment-wp-#{$color-name} .segment-button {
color: $color-base;
&.activated,
&.segment-activated {
border-color: $color-base;
color: $color-base;
opacity: $segment-button-wp-opacity-activated;
}
}
}
// Windows Segment Color Generation
// --------------------------------------------------
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
@include wp-segment-button($color-name, $color-base);
}