@include valo-link-style;
}
+ .#{$primary-stylename}-tiny {
+ @include valo-button-style($unit-size: $v-unit-size--tiny, $bevel: null, $shadow: null, $background-color: null, $font-size: $v-font-size--tiny, $font-weight: null);
+ }
+
.#{$primary-stylename}-small {
@include valo-button-style($unit-size: $v-unit-size--small, $bevel: null, $shadow: null, $background-color: null, $font-size: $v-font-size--small, $font-weight: null);
}
@include valo-button-style($unit-size: $v-unit-size--large, $bevel: null, $shadow: null, $background-color: null, $font-size: $v-font-size--large, $font-weight: null);
}
+ .#{$primary-stylename}-huge {
+ @include valo-button-style($unit-size: $v-unit-size--huge, $bevel: null, $shadow: null, $background-color: null, $font-size: $v-font-size--huge, $font-weight: null);
+ }
+
.#{$primary-stylename}-icon-align-right {
@include valo-button-icon-align-right-style;
}
width: $v-unit-size;
padding: 0;
+ &.#{$primary-stylename}-tiny {
+ width: $v-unit-size--tiny;
+ }
+
&.#{$primary-stylename}-small {
width: $v-unit-size--small;
}
width: $v-unit-size--large;
}
+ &.#{$primary-stylename}-huge {
+ width: $v-unit-size--huge;
+ }
+
.#{$primary-stylename}-caption {
display: none;
}
text-align: center;
}
+ .#{$primary-stylename}-tiny {
+ @include valo-combobox-style($unit-size: $v-unit-size--tiny, $bevel: null, $shadow: null, $gradient: null, $border: null, $border-radius: null, $background-color: null, $states: normal);
+ font-size: $v-font-size--tiny;
+ }
+
.#{$primary-stylename}-small {
@include valo-combobox-style($unit-size: $v-unit-size--small, $bevel: null, $shadow: null, $gradient: null, $border: null, $border-radius: null, $background-color: null, $states: normal);
font-size: $v-font-size--small;
@include valo-combobox-style($unit-size: $v-unit-size--large, $bevel: null, $shadow: null, $gradient: null, $border: null, $border-radius: null, $background-color: null, $states: normal);
font-size: $v-font-size--large;
}
+
+ .#{$primary-stylename}-huge {
+ @include valo-combobox-style($unit-size: $v-unit-size--huge, $bevel: null, $shadow: null, $gradient: null, $border: null, $border-radius: null, $background-color: null, $states: normal);
+ font-size: $v-font-size--huge;
+ }
}
}
text-align: center;
}
+ .#{$primary-stylename}-tiny {
+ @include valo-datefield-style($unit-size: $v-unit-size--tiny, $bevel: null, $shadow: null, $border: null, $background-color: null, $states: normal);
+ font-size: $v-font-size--tiny;
+ }
+
.#{$primary-stylename}-small {
@include valo-datefield-style($unit-size: $v-unit-size--small, $bevel: null, $shadow: null, $border: null, $background-color: null, $states: normal);
font-size: $v-font-size--small;
@include valo-datefield-style($unit-size: $v-unit-size--large, $bevel: null, $shadow: null, $border: null, $background-color: null, $states: normal);
font-size: $v-font-size--large;
}
+
+ .#{$primary-stylename}-huge {
+ @include valo-datefield-style($unit-size: $v-unit-size--huge, $bevel: null, $shadow: null, $border: null, $background-color: null, $states: normal);
+ font-size: $v-font-size--huge;
+ }
}
}
font-size: $v-font-size--small;
}
+ .#{$primary-stylename}-tiny {
+ font-size: $v-font-size--tiny;
+ }
+
+ .#{$primary-stylename}-huge {
+ font-size: $v-font-size--huge;
+ }
+
.#{$primary-stylename}-bold {
font-weight: $v-font-weight + 200;
}
@include valo-textfield-borderless-style;
}
+ .#{$primary-stylename}-tiny {
+ @include valo-textarea-style($unit-size: $v-unit-size--tiny, $states: normal, $background-color: null, $border: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--tiny;
+ }
+
.#{$primary-stylename}-small {
@include valo-textarea-style($unit-size: $v-unit-size--small, $states: normal, $background-color: null, $border: null, $bevel: null, $shadow: null);
font-size: $v-font-size--small;
font-size: $v-font-size--large;
}
+ .#{$primary-stylename}-huge {
+ @include valo-textarea-style($unit-size: $v-unit-size--huge, $states: normal, $background-color: null, $border: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--huge;
+ }
+
.#{$primary-stylename}-align-right {
text-align: right;
}
@include valo-textfield-borderless-style;
}
+ .#{$primary-stylename}-tiny {
+ @include valo-textfield-style($unit-size: $v-unit-size--tiny, $states: normal, $background-color: null, $border: null, $gradient: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--tiny;
+ }
+
.#{$primary-stylename}-small {
@include valo-textfield-style($unit-size: $v-unit-size--small, $states: normal, $background-color: null, $border: null, $gradient: null, $bevel: null, $shadow: null);
font-size: $v-font-size--small;
font-size: $v-font-size--large;
}
+ .#{$primary-stylename}-huge {
+ @include valo-textfield-style($unit-size: $v-unit-size--huge, $states: normal, $background-color: null, $border: null, $gradient: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--huge;
+ }
+
@include valo-textfield-inline-icon($stylenames: inline-icon);
+ @include valo-textfield-inline-icon($stylenames: inline-icon tiny, $unit-size: $v-unit-size--tiny, $font-size: $v-font-size--tiny);
@include valo-textfield-inline-icon($stylenames: inline-icon small, $unit-size: $v-unit-size--small, $font-size: $v-font-size--small);
@include valo-textfield-inline-icon($stylenames: inline-icon large, $unit-size: $v-unit-size--large, $font-size: $v-font-size--large);
+ @include valo-textfield-inline-icon($stylenames: inline-icon huge, $unit-size: $v-unit-size--huge, $font-size: $v-font-size--huge);
.#{$primary-stylename}-align-right {
text-align: right;
$v-friendly-color : #2c9720 !default;
-$v-scaling-factor--small : 0.8 !default;
+$v-scaling-factor--tiny : 0.75 !default;
+$v-scaling-factor--small : 0.85 !default;
$v-scaling-factor--large : 1.2 !default;
+$v-scaling-factor--huge : 1.6 !default;
+$v-unit-size--tiny : round($v-unit-size * $v-scaling-factor--tiny) !default;
$v-unit-size--small : round($v-unit-size * $v-scaling-factor--small) !default;
$v-unit-size--large : round($v-unit-size * $v-scaling-factor--large) !default;
+$v-unit-size--huge : round($v-unit-size * $v-scaling-factor--huge) !default;
-$v-font-size--small : round($v-font-size * $v-scaling-factor--small) !default;
-$v-font-size--large : round($v-font-size * $v-scaling-factor--large) !default;
+$v-font-size--tiny : ceil($v-font-size * $v-scaling-factor--tiny) !default;
+$v-font-size--small : ceil($v-font-size * $v-scaling-factor--small) !default;
+$v-font-size--large : ceil($v-font-size * $v-scaling-factor--large) !default;
+$v-font-size--huge : ceil($v-font-size * $v-scaling-factor--huge) !default;
* </p>
*
* <p>
- * These styles are only available if the Valo theme (or any of it's variants)
- * is built with the <code>$valo-include-common-stylenames</code> Sass variable
- * set to <code>true</code>.
+ * These styles are only available if the
+ * <code>$v-included-additional-styles</code> Sass list variable contains the
+ * name of the component for that additional style name (e.g.
+ * <code>button, textfield, table</code>).
* </p>
*
* <p>
*/
public static final String LABEL_NO_MARGIN = "no-margin";
+ /**
+ * Tiny font size. Suitable for additional/supplementary UI text. Can be
+ * combined with any other Label style.
+ */
+ public static final String LABEL_TINY = "tiny";
+
/**
* Small font size. Suitable for additional/supplementary UI text. Can be
* combined with any other Label style.
*/
public static final String LABEL_LARGE = "large";
+ /**
+ * Huge font size. Suitable for important/prominent UI text. Can be combined
+ * with any other Label style.
+ */
+ public static final String LABEL_HUGE = "huge";
+
/**
* Lighter font weight. Suitable for additional/supplementary UI text. Can
* be combined with any other Label style.
*/
public static final String BUTTON_LINK = "link";
+ /**
+ * Tiny size button. Can be combined with any other Button style.
+ */
+ public static final String BUTTON_TINY = "tiny";
+
/**
* Small size button. Can be combined with any other Button style.
*/
*/
public static final String BUTTON_LARGE = "large";
+ /**
+ * Huge size button. Can be combined with any other Button style.
+ */
+ public static final String BUTTON_HUGE = "huge";
+
/**
* Align the icon to the right side of the button caption. Can be combined
* with any other Button style.
*
**************************************************************************/
+ /**
+ * Tiny size text field. Can be combined with any other TextField style.
+ */
+ public static final String TEXTFIELD_TINY = "tiny";
+
/**
* Small size text field. Can be combined with any other TextField style.
*/
*/
public static final String TEXTFIELD_LARGE = "large";
+ /**
+ * Huge size text field. Can be combined with any other TextField style.
+ */
+ public static final String TEXTFIELD_HUGE = "huge";
+
/**
* Removes the border and background from the text field. Can be combined
* with any other TextField style.
*
**************************************************************************/
+ /**
+ * Tiny size text area. Can be combined with any other TextArea style.
+ */
+ public static final String TEXTAREA_TINY = "tiny";
+
/**
* Small size text area. Can be combined with any other TextArea style.
*/
*/
public static final String TEXTAREA_LARGE = "large";
+ /**
+ * Huge size text area. Can be combined with any other TextArea style.
+ */
+ public static final String TEXTAREA_HUGE = "huge";
+
/**
* Removes the border and background from the text area. Can be combined
* with any other TextArea style.
*
**************************************************************************/
+ /**
+ * Tiny size date field. Can be combined with any other DateField style.
+ */
+ public static final String DATEFIELD_TINY = "tiny";
+
/**
* Small size date field. Can be combined with any other DateField style.
*/
*/
public static final String DATEFIELD_LARGE = "large";
+ /**
+ * Huge size date field. Can be combined with any other DateField style.
+ */
+ public static final String DATEFIELD_HUGE = "huge";
+
/**
* Removes the border and background from the date field. Can be combined
* with any other DateField style.
*
**************************************************************************/
+ /**
+ * Tiny size combo box. Can be combined with any other ComboBox style.
+ */
+ public static final String COMBOBOX_TINY = "tiny";
+
/**
* Small size combo box. Can be combined with any other ComboBox style.
*/
*/
public static final String COMBOBOX_LARGE = "large";
+ /**
+ * Huge size combo box. Can be combined with any other ComboBox style.
+ */
+ public static final String COMBOBOX_HUGE = "huge";
+
/**
* Removes the border and background from the combo box. Can be combined
* with any other ComboBox style.
button = new Button("Three");
group.addComponent(button);
+ button = new Button("Tiny");
+ button.addStyleName("tiny");
+ row.addComponent(button);
+
+ button = new Button("Huge");
+ button.addStyleName("huge");
+ row.addComponent(button);
+
NativeButton nbutton = new NativeButton("Native");
row.addComponent(nbutton);
combo.addItem("Option Three");
combo.addStyleName("borderless");
row.addComponent(combo);
+
+ combo = new ComboBox("Tiny");
+ combo.setInputPrompt("You can type here");
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
+ combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
+ combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
+ combo.addStyleName("tiny");
+ row.addComponent(combo);
+
+ combo = new ComboBox("Huge");
+ combo.setInputPrompt("You can type here");
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
+ combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
+ combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
+ combo.addStyleName("huge");
+ row.addComponent(combo);
}
@Override
date.setDateFormat("E dd/MM/yyyy");
row.addComponent(date);
+ date = new DateField("Tiny");
+ date.setValue(new Date());
+ date.setResolution(Resolution.DAY);
+ date.addStyleName("tiny");
+ row.addComponent(date);
+
+ date = new DateField("Huge");
+ date.setValue(new Date());
+ date.setResolution(Resolution.DAY);
+ date.addStyleName("huge");
+ row.addComponent(date);
+
date = new InlineDateField("Date picker");
setDate(date);
row.addComponent(date);
left.setMargin(new MarginInfo(false, true, false, false));
split.addComponent(left);
+ Label huge = new Label("Huge type for display text.");
+ huge.addStyleName("huge");
+ left.addComponent(huge);
+
Label large = new Label(
"Large type for introductory text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
large.addStyleName("large");
small.addStyleName("small");
left.addComponent(small);
+ Label tiny = new Label("Tiny type for minor text.");
+ tiny.addStyleName("tiny");
+ left.addComponent(tiny);
+
Label h4 = new Label("Section Title");
h4.addStyleName("h4");
left.addComponent(h4);
pwf.setIcon(FontAwesome.LOCK);
row.addComponent(pwf);
+ tf = new TextField("Tiny");
+ tf.setValue("Field value");
+ tf.addStyleName("tiny");
+ row.addComponent(tf);
+
+ tf = new TextField("Huge");
+ tf.setValue("Field value");
+ tf.addStyleName("huge");
+ row.addComponent(tf);
+
h1 = new Label("Text Areas");
h1.addStyleName("h1");
addComponent(h1);
ta.setValue("Field value, spanning multiple lines of text");
row.addComponent(ta);
+ ta = new TextArea("Tiny");
+ ta.addStyleName("tiny");
+ ta.setInputPrompt("Write your comment…");
+ row.addComponent(ta);
+
+ ta = new TextArea("Huge");
+ ta.addStyleName("huge");
+ ta.setInputPrompt("Write your comment…");
+ row.addComponent(ta);
+
RichTextArea rta = new RichTextArea();
rta.setValue("<b>Some</b> <i>rich</i> content");
row.addComponent(rta);