Module: features/bars/bar
Interfaces
BarOptions
• BarOptions: Object
An object that configures a Bar.
Name | Type | Description |
---|---|---|
baseStyle? | Computable <StyleValue > | CSS to apply to the bar's base. |
borderStyle? | Computable <StyleValue > | CSS to apply to the bar's border. |
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
direction | Computable <Direction > | The direction in which the bar progresses. |
display? | Computable <CoercableComponent > | The display to use for this bar. |
fillStyle? | Computable <StyleValue > | CSS to apply to the bar's fill. |
height | Computable <number > | The height of the bar. |
mark? | Computable <string | boolean > | Shows a marker on the corner of the feature. |
progress | Computable <DecimalSource > | The progress value of the bar, from 0 to 1. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
textStyle? | Computable <StyleValue > | CSS to apply to the bar's text. |
visibility? | Computable <boolean | Visibility > | Whether this bar should be visible. |
width | Computable <number > | The width of the bar. |
Defined in
profectus/src/features/bars/bar.ts:29
BaseBar
• BaseBar: Object
The properties that are added onto a processed BarOptions to create a Bar.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof BarType | A symbol that helps identify features of the same type. |
Defined in
profectus/src/features/bars/bar.ts:61
Type Aliases
Bar
Ƭ Bar<T
>: Replace
<T
& BaseBar
, { baseStyle
: GetComputableType
<T
["baseStyle"
]> ; borderStyle
: GetComputableType
<T
["borderStyle"
]> ; classes
: GetComputableType
<T
["classes"
]> ; direction
: GetComputableType
<T
["direction"
]> ; display
: GetComputableType
<T
["display"
]> ; fillStyle
: GetComputableType
<T
["fillStyle"
]> ; height
: GetComputableType
<T
["height"
]> ; mark
: GetComputableType
<T
["mark"
]> ; progress
: GetComputableType
<T
["progress"
]> ; style
: GetComputableType
<T
["style"
]> ; textStyle
: GetComputableType
<T
["textStyle"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> ; width
: GetComputableType
<T
["width"
]> }>
An object that represents a feature that displays some sort of progress or completion or resource with a cap.
Type parameters
Name | Type |
---|---|
T | extends BarOptions |
Defined in
profectus/src/features/bars/bar.ts:73
GenericBar
Ƭ GenericBar: Replace
<Bar
<BarOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Bar object.
Defined in
profectus/src/features/bars/bar.ts:93
Variables
BarType
• Const
BarType: typeof BarType
A symbol used to identify Bar features.
Defined in
profectus/src/features/bars/bar.ts:24
Functions
createBar
▸ createBar<T
>(optionsFunc
, ...decorators
): Bar
<T
>
Lazily creates a bar with the given options.
Type parameters
Name | Type |
---|---|
T | extends BarOptions |
Parameters
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseBar , GenericBar > | Bar options. |
...decorators | GenericDecorator [] | - |
Returns
Bar
<T
>
Defined in
profectus/src/features/bars/bar.ts:104
Components
Bar Component
Props
Name | Type |
---|---|
progress * | processedPropType<DecimalSource>(String, Object, Number) |
width * | processedPropType<number>(Number) |
height * | processedPropType<number>(Number) |
direction * | processedPropType<Direction>(String) |
display | processedPropType<CoercableComponent>(Object, String, Function) |
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
style | processedPropType<StyleValue>(Object, String, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
borderStyle | processedPropType<StyleValue>(Object, String, Array) |
textStyle | processedPropType<StyleValue>(Object, String, Array) |
baseStyle | processedPropType<StyleValue>(Object, String, Array) |
fillStyle | processedPropType<StyleValue>(Object, String, Array) |
mark | processedPropType<boolean | string>(Boolean, String) |
id * | string |