UNPKG

4.03 kBTypeScriptView Raw
1import { NestedCSSProperties } from 'typestyle/lib/types';
2export declare namespace LabIconStyle {
3 /**
4 * - breadCrumb: The path icons above the filebrowser
5 * - commandPaletteHeader: The icon to the right of palette section headers
6 * - commandPaletteItem: The icon next to a palette item
7 * - launcherCard: The icons for the cards at the bottom of the launcher
8 * - launcherSection: The icons to left of the Launcher section headers
9 * - listing: The icons to the left of the filebrowser listing items
10 * - listingHeaderItem: Caret icons used to show sort order in listing column headers
11 * - mainAreaTab: The icons in the tabs above the main area/the tabManager in the sidebar
12 * - menuItem: The icon next to a menu item
13 * - runningItem: The icon next to an item in the Running sidebar
14 * - select: The caret icon on the left side of a dropdown select element
15 * - settingsEditor: The icons to the left of each section of the settings editor
16 * - sideBar: The icons for the sidebar (default to the left of the main window)
17 * - splash: The icon used for the splash screen
18 * - statusBar: The icons in the status bar
19 * - toolbarButton: The icon shown on a toolbar button
20 */
21 type IBuiltin = 'breadCrumb' | 'commandPaletteHeader' | 'commandPaletteItem' | 'launcherCard' | 'launcherSection' | 'listing' | 'listingHeaderItem' | 'mainAreaTab' | 'menuItem' | 'runningItem' | 'select' | 'settingsEditor' | 'sideBar' | 'splash' | 'statusBar' | 'toolbarButton';
22 type IPosition = 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top right' | 'bottom right' | 'bottom left' | 'top left';
23 type ISize = 'small' | 'normal' | 'large' | 'xlarge';
24 /**
25 * Options that function as a shorthand for compound CSS properties,
26 * such as the set of props required to center an svg inside
27 * of a parent node
28 */
29 interface ISheetOptions {
30 /**
31 * How to position the inner svg element,
32 * relative to the outer container
33 */
34 elementPosition?: IPosition;
35 /**
36 * the size of the inner svg element. Can be any of:
37 * - 'small': 14px x 14px
38 * - 'normal': 16px x 16px
39 * - 'large': 20px x 20px
40 * - 'xlarge': 24px x 24px
41 */
42 elementSize?: ISize;
43 }
44 /**
45 * Stylesheet with a collection of CSS props for each node
46 * in an icon, plus some custom options
47 */
48 interface ISheet {
49 /**
50 * CSS properties that will be applied to the outer container
51 * element via a typestyle class
52 */
53 container?: NestedCSSProperties;
54 /**
55 * CSS properties that will be applied to the inner svg
56 * element via a typestyle class
57 */
58 element?: NestedCSSProperties;
59 /**
60 * Options that function as modifiers for this style's
61 * CSS properties
62 */
63 options?: ISheetOptions;
64 }
65 /**
66 * Type to help with resolving a stylesheet that might be a string
67 */
68 type ISheetResolvable = ISheet | IBuiltin;
69 export interface IProps extends NestedCSSProperties, ISheetOptions {
70 /**
71 * Specify the icon styling. Can be either a string naming one of
72 * the builtin icon stylesheets, a LabIconStyle.ISheet object, or an
73 * array containing any mixture of the two. If an array is provided,
74 * the actual style will be determined by merging the stylesheets in
75 * the array, giving precedence to the rightmost values.
76 */
77 stylesheet?: ISheetResolvable | ISheetResolvable[];
78 /**
79 * @deprecated use stylesheet instead
80 */
81 kind?: IBuiltin;
82 /**
83 * @deprecated use elementPosition instead
84 */
85 justify?: 'center' | 'right' | 'left';
86 }
87 /**
88 * Get a typestyle class, given a set of icon styling props
89 */
90 export function styleClass(props?: IProps): string;
91 export {};
92}