Kind: global interface
- Styleguide
- .type :
String
- .name :
String
- .parent :
Styleguide
- .textStyles :
Array<TextStyle>
- .colors :
Array<Color>
- .spacingSections :
Array<SpacingSection>
- .components :
Array<Component>
- .density :
String
- .densityDivisor :
Number
- .lengthUnit :
String
- .textLengthUnit :
String
- .remPreferences :
RemPreferences?
- .findTextStyleByName(name, useParentStyleguides = true) ⇒
TextStyle
- .findTextStyleEqual(textStyle, useParentStyleguides = true) ⇒
TextStyle
- .findBestConformingTextStyle(textStyle, useParentStyleguides = true) ⇒
TextStyle
- .findColorByName(name, useParentStyleguides = true) ⇒
Color
- .findColorEqual(color, useParentStyleguides = true) ⇒
Color
- .findColorByHexAndAlpha(values, useParentStyleguides = true) ⇒
Color
- .findSpacingTokenByValue(value, useParentStyleguides = true) ⇒
SpacingToken?
- .findSpacingTokenByName(name, useParentStyleguides = true) ⇒
SpacingToken?
- .findComponentByName(name, useLinkedStyleguides = true) ⇒
Component?
- .findComponentBySourceId(sourceId, useLinkedStyleguides = true) ⇒
Component?
- .type :
Type of the styleguide, base
, web
, android
, ios
or osx
.
Kind: instance property of Styleguide
Name of the styleguide.
Kind: instance property of Styleguide
styleguide.parent : Styleguide?
Parent styleguide of the styleguide.
Kind: instance property of Styleguide
styleguide.textStyles : Array<TextStyle>
Text styles in the styleguide.
Kind: instance property of Styleguide
styleguide.colors : Array<Color>
Colors in the styleguide.
Kind: instance property of Styleguide
styleguide.spacingSections : Array<SpacingSection>
Spacing sections in the styleguide.
Kind: instance property of Styleguide
project.components : Array<Component>
components in the project.
Kind: instance property of Project
Pixel density of the styleguide.
Kind: instance property of Styleguide
Divisor corresponding to the density, used to obtain actual values from unit values.
Kind: instance property of Styleguide
Length unit of the styleguide, based on the type, e.g. px
for Web, pt
for iOS.
Kind: instance property of Styleguide
Text length unit of the styleguide, based on the type, e.g. dp
for Android.
Kind: instance property of Styleguide
Styleguide.remPreferences : RemPreferences?
rem preferences of the styleguide (web styleguides only). This property exists only if rem is enabled for the styleguide.
Kind: instance property of Styleguide
styleguide.findTextStyleByName(name, useParentStyleguides = true) ⇒ TextStyle?
Finds text style in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
name | String |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findTextStyleEqual(textStyle, useParentStyleguides = true) ⇒ TextStyle?
Finds text style in the styleguide or in the parent styleguides (if useParentStyleguides is true) equal to another text style.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
textStyle | TextStyle |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findBestConformingTextStyle(textStyle, useParentStyleguides = true) ⇒ TextStyle?
Finds best conforming text style in the styleguide or in the parent styleguides (if useParentStyleguides is true).
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
textStyle | TextStyle |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findColorByName(name, useParentStyleguides = true) ⇒ Color?
Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
name | String |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findColorEqual(color, useParentStyleguides = true) ⇒ Color?
Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) equal to another color.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
color | Color |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findColorByHexAndAlpha(values, useParentStyleguides = true) ⇒ Color?
Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) by hex and alpha values.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
values | Object |
|
values.hex | String |
Hex string for RGB components of the color, e.g. rrggbb . |
values.alpha | String |
Alpha value of the color. |
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findSpacingTokenByValue(value, useParentStyleguides = true) ⇒ SpacingToken?
Finds spacing token in the styleguide or in the parent styleguides (if useParentStyleguides is true) by value.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
value | Number |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findSpacingTokenByName(name, useParentStyleguides = true) ⇒ SpacingToken?
Finds spacing token in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
name | String |
|
useParentStyleguides | Boolean |
Whether parent styleguides should be included in the search. Defaults to true . |
styleguide.findComponentByName(name, useLinkedStyleguides = true) ⇒ Component?
Finds a component in the styleguide or in the linked styleguides (if useLinkedStyleguides is true) by name.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
name | String |
|
useLinkedStyleguides | Boolean |
Whether linked styleguides should be included in the search. Defaults to true . |
styleguide.findComponentBySourceId(name, useLinkedStyleguides = true) ⇒ Component?
Finds a component in the styleguide or in the linked styleguides (if useLinkedStyleguides is true) by id in the source design document.
Kind: instance method of Styleguide
Param | Type | Description |
---|---|---|
name | String |
|
useLinkedStyleguides | Boolean |
Whether linked styleguides should be included in the search. Defaults to true . |