@omegagrid/core 0.6.139 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/numbers.d.ts.map +1 -1
- package/dist/common/options.d.ts.map +1 -1
- package/dist/common/tree.d.ts +30 -25
- package/dist/common/tree.d.ts.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +1 -1
- package/dist/themes/mixins.d.ts.map +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/button.style.d.ts.map +1 -1
- package/dist/ui/button.style.js +6 -4
- package/dist/ui/button.style.js.map +1 -1
- package/dist/ui/colorpicker.d.ts.map +1 -1
- package/dist/ui/dropdown.d.ts.map +1 -1
- package/dist/ui/fileInput.d.ts.map +1 -1
- package/dist/ui/icon.d.ts +26 -6
- package/dist/ui/icon.d.ts.map +1 -1
- package/dist/ui/icon.js +149 -35
- package/dist/ui/icon.js.map +1 -1
- package/dist/ui/icon.style.d.ts +2 -0
- package/dist/ui/icon.style.d.ts.map +1 -0
- package/dist/ui/icon.style.js +556 -0
- package/dist/ui/icon.style.js.map +1 -0
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/loader.d.ts +4 -7
- package/dist/ui/loader.d.ts.map +1 -1
- package/dist/ui/loader.js +9 -21
- package/dist/ui/loader.js.map +1 -1
- package/dist/ui/menu.d.ts.map +1 -1
- package/dist/ui/numericInput.d.ts.map +1 -1
- package/dist/ui/sizer.d.ts.map +1 -1
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/sortableList.d.ts.map +1 -1
- package/dist/ui/splitContainer.d.ts.map +1 -1
- package/package.json +4 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/common/numbers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EAAE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C,EAAE,IAAI,CAAA;CACX,CAAA;AAID,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/common/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAuB,gBAAgB,EAAE,qBAAqB,EAAiB,MAAM,SAAS,CAAC;AAKtG,MAAM,MAAM,OAAO,GAAG;IACrB,sCAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAA;CACX,CAAA;AAID,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,CAAC,OAAO,CAAC,SAG1D,CAAA;AAED,eAAO,MAAM,iBAAiB,QAAO,OAAO,CAAC,OAAO,CAUlC,CAAC;AAEnB,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,WAAW,GAAE,CAAQ,GAAG,CAAC,CAK7F"}
|
package/dist/common/tree.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ export declare function TreeNodeMixin<TBase extends Constructor>(Base?: TBase):
|
|
|
33
33
|
parentIndex: number;
|
|
34
34
|
level: number;
|
|
35
35
|
visibleIndex: number;
|
|
36
|
-
_children: any[];
|
|
36
|
+
_children: /*elided*/ any[];
|
|
37
37
|
_count: number;
|
|
38
|
-
_parent: any;
|
|
38
|
+
_parent: /*elided*/ any;
|
|
39
39
|
_collapsed: boolean;
|
|
40
40
|
_hidden: boolean;
|
|
41
41
|
_filterState: FilterState;
|
|
@@ -43,33 +43,38 @@ export declare function TreeNodeMixin<TBase extends Constructor>(Base?: TBase):
|
|
|
43
43
|
_sortable: boolean;
|
|
44
44
|
populate(source: TreeNodeSource): void;
|
|
45
45
|
getSourceData(): TreeNodeSource;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
filterState: FilterState;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
get filterable(): boolean;
|
|
47
|
+
get sortable(): boolean;
|
|
48
|
+
get filterState(): FilterState;
|
|
49
|
+
set filterState(v: FilterState);
|
|
50
|
+
get hidden(): boolean;
|
|
51
|
+
set hidden(value: boolean);
|
|
52
|
+
get visible(): boolean;
|
|
53
|
+
get collapsed(): boolean;
|
|
54
|
+
set collapsed(value: boolean);
|
|
55
|
+
get parent(): /*elided*/ any;
|
|
56
|
+
set parent(parent: /*elided*/ any);
|
|
57
|
+
get children(): /*elided*/ any[];
|
|
58
|
+
set children(value: /*elided*/ any[]);
|
|
59
|
+
get hasChildren(): boolean;
|
|
60
|
+
set count(value: number);
|
|
61
|
+
get isLoaded(): boolean;
|
|
62
|
+
get isPartialyLoaded(): boolean;
|
|
63
|
+
get hasParent(): boolean;
|
|
64
|
+
get firstChild(): /*elided*/ any;
|
|
65
|
+
get lastChild(): /*elided*/ any;
|
|
66
|
+
addChild(child: /*elided*/ any): void;
|
|
67
|
+
insertChildren(children: /*elided*/ any[], index: number): void;
|
|
68
|
+
deleteChildren(index: number | /*elided*/ any[], count?: number): void;
|
|
64
69
|
expand(unhide?: boolean): void;
|
|
65
70
|
collapse(): void;
|
|
66
71
|
toggleCollapse(recursive?: boolean, unhide?: boolean): void;
|
|
67
72
|
clearChildren(): void;
|
|
68
|
-
walk(cb: (m: any) => unknown | void): void;
|
|
69
|
-
walkVisible(cb: (m: any) => unknown | void): void;
|
|
70
|
-
walkUp(cb: (m: any) => unknown | void): void;
|
|
71
|
-
_sort(comparer: (a: any, b: any) => number): void;
|
|
72
|
-
sort(comparer: (a: any, b: any) => number): void;
|
|
73
|
+
walk(cb: (m: /*elided*/ any) => unknown | void): void;
|
|
74
|
+
walkVisible(cb: (m: /*elided*/ any) => unknown | void): void;
|
|
75
|
+
walkUp(cb: (m: /*elided*/ any) => unknown | void): void;
|
|
76
|
+
_sort(comparer: (a: /*elided*/ any, b: /*elided*/ any) => number): void;
|
|
77
|
+
sort(comparer: (a: /*elided*/ any, b: /*elided*/ any) => number): void;
|
|
73
78
|
};
|
|
74
79
|
} & TBase;
|
|
75
80
|
export type TreeNodeType = Mixin<typeof TreeNodeMixin>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/common/tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE9C,oBAAY,WAAW;IACtB,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,YAAY,IAAI;IAChB,aAAa,IAAI;CACjB;AAED,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG;IAC5B,4BAA4B;IAC5B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE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X: string;
|
|
4
4
|
DEFAULT_ACCENT_COLOR: string;
|
|
5
|
-
DEFAULT_ACCENT_COLOR_2: Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | any | ArrayLike<number> | {
|
|
5
|
+
DEFAULT_ACCENT_COLOR_2: Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | Color<string | number | /*elided*/ any | ArrayLike<number> | {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}> | ArrayLike<number> | {
|
|
8
8
|
[key: string]: any;
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,4 @@ export * from './ui';
|
|
|
5
5
|
export * from './types';
|
|
6
6
|
export * from './themes';
|
|
7
7
|
export * from './model';
|
|
8
|
-
import { FontAwesomeIcon, FontAwesomeLayers } from '@riovir/wc-fontawesome';
|
|
9
|
-
if (!customElements.get('og-fa-icon')) {
|
|
10
|
-
customElements.define('og-fa-icon', FontAwesomeIcon);
|
|
11
|
-
}
|
|
12
|
-
if (!customElements.get('og-fa-layers')) {
|
|
13
|
-
customElements.define('og-fa-layers', FontAwesomeLayers);
|
|
14
|
-
}
|
|
15
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAA4B,WAAW,IAAI,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACjH,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAA4B,WAAW,IAAI,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACjH,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC","sourcesContent":["export * from './common';\nexport { default as constants } from './constants';\nexport { Options as CommonOptions, initOptions as initCommonOptions, getDefaultOptions } from './common/options';\nexport * from './ui';\nexport * from './types';\nexport * from './themes';\nexport * from './model';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixins.d.ts","sourceRoot":"","sources":["../../src/themes/mixins.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAqB,UAAU,EAAa,MAAM,KAAK,CAAC;AAG/D,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"mixins.d.ts","sourceRoot":"","sources":["../../src/themes/mixins.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAqB,UAAU,EAAa,MAAM,KAAK,CAAC;AAG/D,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,MAAM,CAAC,SAAS,cAAc,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,KAUnE,cAAc,CAAC,UAAU,CAAC,GAAG,CACxD,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAC,YAAY,GAAC,QAAQ,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,aAAa,MAAM,CAAC,SAAS,cAAc,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,KAsB1E,cAAc,CAAC,UAAU,CAAC,GAAG,CACxD,CAAC"}
|
package/dist/ui/button.js
CHANGED
|
@@ -31,7 +31,7 @@ let Button = class Button extends LitElement {
|
|
|
31
31
|
: html `${msg(this.text)}`}
|
|
32
32
|
</div>
|
|
33
33
|
` : html ``}
|
|
34
|
-
${this.caret ? html `<og-
|
|
34
|
+
${this.caret ? html `<og-icon icon="caret-down" style="margin: 0"></og-icon>` : ''}
|
|
35
35
|
</div>
|
|
36
36
|
`;
|
|
37
37
|
this.addEventListener('click', (e) => {
|
package/dist/ui/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAInC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IA+BrC;QACC,KAAK,EAAE,CAAC;QAxBT,SAAI,GAAW,IAAI,CAAC;QAGpB,UAAK,GAAe,UAAU,CAAC,MAAM,CAAC;QAGtC,UAAK,GAAG,KAAK,CAAC;QAGd,aAAQ,GAAG,KAAK,CAAC;QAGjB,YAAO,GAAG,KAAK,CA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AC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qCAC3B;AAGd;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;wCACxB;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;uCACzB;AAGhB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qCACJ;AAGpC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;oCACL;AAGnC;IADC,KAAK,EAAE;0CACa;AA7BT,MAAM;IAFlB,aAAa,CAAC,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAC,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAC,CAAC;GACzC,MAAM,CA6ElB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ColorTypes } from '../types';\nimport { colorable } from '../themes';\nimport { style } from './button.style';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\nimport { msg } from '@omegagrid/localize';\n\n@customElement(`og-button`)\n@colorable({props: ['color', 'border', 'background']})\nexport class Button extends LitElement {\n\n\tstatic styles = [style];\n\n\t@property()\n\ticon: string|IconSpec;\n\n\t@property({type: String})\n\ttext: string = null;\n\n\t@property({type: String, reflect: true})\n\tcolor: ColorTypes = ColorTypes.Accent;\n\n\t@property({type: Boolean, reflect: true})\n\tcaret = false;\n\n\t@property({type: Boolean, reflect: true})\n\tdisabled = false;\n\n\t@property({type: Boolean, reflect: true})\n\tdefault = false;\n\n\t@property({type: String, reflect: true})\n\tstate: 'checked'|'unchecked' = null;\n\n\t@property({type: String, reflect: true})\n\ttype: 'normal'|'toggle' = 'normal';\n\n\t@state()\n\tbuttonIcon: IconSpec;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('click', (e: PointerEvent) => {\n\t\t\tif (this.disabled) e.stopImmediatePropagation();\n\t\t\telse if (this.type == 'toggle') {\n\t\t\t\tthis.state = this.state == 'checked' ? 'unchecked' : 'checked';\n\t\t\t}\n\t\t});\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 1;\n\t}\n\n\twillUpdate(props: Map<PropertyKey, undefined>) {\n\t\tif (this.type == 'toggle' && this.state == null) {\n\t\t\tthis.state = 'unchecked';\n\t\t}\n\n\t\tif (props.has('icon')) {\n\t\t\tif (utils.isObject(this.icon)) {\n\t\t\t\tthis.buttonIcon = this.icon as IconSpec;\n\t\t\t} else if (this.icon) {\n\t\t\t\tthis.buttonIcon = {icon: this.icon as string};\n\t\t\t} else {\n\t\t\t\tthis.buttonIcon = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tget hasContent() { return this.text || (this.children.length > 0 && this.children[0].slot == 'content') }\n\n\trender = () => html`\n\t\t<div class=\"${classMap({inner: true, 'has-content': this.hasContent})}\">\n\t\t\t${this.buttonIcon ? html`<og-icon .icon=\"${this.buttonIcon}\"></og-icon>` : html``}\n\t\t\t${this.hasContent ? html`\n\t\t\t<div class=\"content\">${this.text == null || this.text === ''\n\t\t\t\t? html`<slot name=\"content\"></slot>`\n\t\t\t\t: html`${msg(this.text)}`}\n\t\t\t</div>\n\t\t\t` : html``}\n\t\t\t${this.caret ? html`<og-icon icon=\"caret-down\" style=\"margin: 0\"></og-icon>` : ''}\n\t\t</div>\n\t`;\n\t\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAqEjB,CAAC"}
|
package/dist/ui/button.style.js
CHANGED
|
@@ -38,10 +38,6 @@ export const style = css `
|
|
|
38
38
|
opacity: 0.8;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
og-icon {
|
|
42
|
-
flex: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
41
|
div.inner {
|
|
46
42
|
display: flex;
|
|
47
43
|
flex-direction: row;
|
|
@@ -61,6 +57,12 @@ export const style = css `
|
|
|
61
57
|
margin: 0 4px;
|
|
62
58
|
}
|
|
63
59
|
|
|
60
|
+
og-icon {
|
|
61
|
+
flex: 0;
|
|
62
|
+
position: relative;
|
|
63
|
+
top: 1px;
|
|
64
|
+
}
|
|
65
|
+
|
|
64
66
|
og-icon+.content {
|
|
65
67
|
margin-left: 4px;
|
|
66
68
|
margin-right: 4px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.style.js","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"button.style.js","sourceRoot":"","sources":["../../src/ui/button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEvB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t:host {\n\t\tfont-size: var(--og-font-size);\n\t\tcursor: pointer;\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t\toverflow: hidden;\n\t\tpadding: 2px;\n\t\toutline: none;\n\t\tuser-select: none;\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\n\t:host([default]) {\n\t\tfont-weight: bold;\n\t\ttext-decoration: underline;\n\t}\n\n\t:host([state=unchecked]) {\n\t\tborder-color: var(--og-background-color);\n\t\tbackground-color: var(--og-background-color);\n\t\tcolor: var(--og-text-color);\n\t}\n\n\t:host([disabled]), :host([disabled]:hover) {\n\t\tbackground-color: gray;\n\t\tborder-color: var(--og-border-color);\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n\n\t:host(:hover) {\n\t\topacity: 0.8;\n\t}\n\n\tdiv.inner {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\theight: 100%;\n\t}\n\n\tdiv.content {\n\t\tflex: 1 0;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t.has-content og-icon {\n\t\tmargin: 0 4px;\n\t}\n\n\tog-icon {\n\t\tflex: 0;\n\t\tposition: relative;\n\t\ttop: 1px;\n\t}\n\n\tog-icon+.content {\n\t\tmargin-left: 4px;\n\t\tmargin-right: 4px;\n\t}\n\t\n`;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorpicker.d.ts","sourceRoot":"","sources":["../../src/ui/colorpicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAO,MAAM,KAAK,CAAC;AA4C5C,qBAAa,gBAAiB,SAAQ,KAAK;aAEA,KAAK,EAAE,MAAM;gBAA3C,IAAI,EAAE,MAAM,EAAkB,KAAK,EAAE,MAAM;CAGvD;AAKD,qBACa,WAAY,SAAQ,UAAU;IAE1C,MAAM,CAAC,MAAM,0BAgDX;IAGF,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IAGnB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,gBAAgB,CAAC;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,UAAS;IACnB,IAAI,gBAAgB,YAAqC;IAEzD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAC,IAAI,EAAE,aAAa,UAAO;;IAgC/C,UAAU;IAOV,cAAc;IAId,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM;IAiB1B,YAAY,
|
|
1
|
+
{"version":3,"file":"colorpicker.d.ts","sourceRoot":"","sources":["../../src/ui/colorpicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAO,MAAM,KAAK,CAAC;AA4C5C,qBAAa,gBAAiB,SAAQ,KAAK;aAEA,KAAK,EAAE,MAAM;gBAA3C,IAAI,EAAE,MAAM,EAAkB,KAAK,EAAE,MAAM;CAGvD;AAKD,qBACa,WAAY,SAAQ,UAAU;IAE1C,MAAM,CAAC,MAAM,0BAgDX;IAGF,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IAGnB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,gBAAgB,CAAC;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,UAAS;IACnB,IAAI,gBAAgB,YAAqC;IAEzD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAC,IAAI,EAAE,aAAa,UAAO;;IAgC/C,UAAU;IAOV,cAAc;IAId,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM;IAiB1B,YAAY,GAAI,IAAI,UAAU,UAU7B;IAED,aAAa,aAGZ;IAED,WAAW;IAMX,MAAM,6CA0BJ;CAEF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAK9C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,qBAAa,aAAc,SAAQ,KAAK;gB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AAE,WAAW,CAAiB;IAG5C,KAAK,EAAE,MAAM,GAAC,WAAW,GAAC,cAAc,CAAC;IAGzC,IAAI,EAAE,QAAQ,GAAC,MAAM,CAAC;IAGtB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,aAAqB;IAG1B,OAAO,UAAS;IAGhB,QAAQ,EAAE,cAAc,CAAC;IAEzB,OAAO,CAAC,WAAW,CAAc;IAEjC,SAAS,CAAC,WAAW,8DAAkC;IACvD,IAAI,QAAQ,sBAAqC;IAEjD,IAAI,MAAM,YAA2D;IAErE,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,GAAI,GAAG,UAAU,UAKpC;IAEK,IAAI;IAyBV,KAAK;IAML,MAAM;IAKN,YAAY,sBAA6B;IAEzC,oBAAoB;IAKpB,cAAc,0BAIZ;IAEF,WAAW,2HAMT;IAEF,IAAI,YAAY,YAEf;IAED,IAAI,QAAQ,YAEX;IAED,MAAM,0BAeJ;IAEF,MAAM;CAiBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileInput.d.ts","sourceRoot":"","sources":["../../src/ui/fileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAOvC,qBACa,SAAU,SAAQ,UAAU;IAExC,MAAM,CAAC,MAAM,4BAAW;IAGxB,QAAQ,UAAS;IAGjB,KAAK,EAAE,IAAI,CAAC;IAGZ,KAAK,EAAE,gBAAgB,CAAC;IAGxB,UAAU,EAAE,MAAM,EAAE,GAAC,MAAM,CAAQ;IAGnC,QAAQ,UAAS;IAGjB,QAAQ,UAAS;;IAWjB,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;IAM3C,iBAAiB;IAOjB,oBAAoB;IAMpB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"fileInput.d.ts","sourceRoot":"","sources":["../../src/ui/fileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAOvC,qBACa,SAAU,SAAQ,UAAU;IAExC,MAAM,CAAC,MAAM,4BAAW;IAGxB,QAAQ,UAAS;IAGjB,KAAK,EAAE,IAAI,CAAC;IAGZ,KAAK,EAAE,gBAAgB,CAAC;IAGxB,UAAU,EAAE,MAAM,EAAE,GAAC,MAAM,CAAQ;IAGnC,QAAQ,UAAS;IAGjB,QAAQ,UAAS;;IAWjB,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;IAM3C,iBAAiB;IAOjB,oBAAoB;IAMpB,iBAAiB,GAAI,GAAG,SAAS,UAGhC;IAED,kBAAkB,GAAI,GAAG,SAAS,UAGjC;IAED,aAAa,GAAI,GAAG,SAAS,UAG5B;IAED,WAAW,GAAI,GAAG,SAAS,UAG1B;IAED,YAAY,GAAI,GAAG,SAAS,UAG3B;IAED,OAAO,GAAI,GAAG,SAAS,UAMtB;IAED,QAAQ,aAGP;IAED,WAAW,CAAC,IAAI,EAAE,IAAI;IAStB,MAAM,6CAuBJ;CAEF"}
|
package/dist/ui/icon.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { IconPrefix } from '@fortawesome/fontawesome-svg-core';
|
|
2
3
|
export type IconSpec = {
|
|
3
4
|
icon: string | [string, string];
|
|
4
5
|
color?: string;
|
|
@@ -10,15 +11,34 @@ export type IconSpec = {
|
|
|
10
11
|
export declare class Icon extends LitElement {
|
|
11
12
|
static defaultIconSet: string;
|
|
12
13
|
static defaultStatusIconSet: string;
|
|
13
|
-
|
|
14
|
-
get statusIconSet(): string;
|
|
15
|
-
static styles: import("lit").CSSResult;
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
16
15
|
private _icon;
|
|
17
16
|
fixedWidth: boolean;
|
|
17
|
+
spin: boolean;
|
|
18
|
+
reverseSpin: boolean;
|
|
19
|
+
flip: boolean;
|
|
20
|
+
pulse: boolean;
|
|
21
|
+
spinPulse: boolean;
|
|
22
|
+
bounce: boolean;
|
|
23
|
+
shake: boolean;
|
|
24
|
+
beat: boolean;
|
|
25
|
+
fade: boolean;
|
|
26
|
+
beatFade: boolean;
|
|
27
|
+
pullLeft: boolean;
|
|
28
|
+
pullRight: boolean;
|
|
29
|
+
size: string;
|
|
30
|
+
color: string;
|
|
18
31
|
set icon(value: IconSpec | string);
|
|
19
32
|
get icon(): IconSpec | string;
|
|
20
|
-
get
|
|
21
|
-
get
|
|
22
|
-
|
|
33
|
+
get iconName(): string;
|
|
34
|
+
get prefix(): IconPrefix;
|
|
35
|
+
get iconSize(): string;
|
|
36
|
+
get iconColor(): string;
|
|
37
|
+
get statusIconName(): string;
|
|
38
|
+
get statusIconPrefix(): string;
|
|
39
|
+
get statusIconColor(): string;
|
|
40
|
+
createMainIcon(): import("@fortawesome/fontawesome-svg-core").Icon;
|
|
41
|
+
createLayeredIcon(): import("@fortawesome/fontawesome-svg-core").Layer;
|
|
42
|
+
updated(): void;
|
|
23
43
|
}
|
|
24
44
|
//# sourceMappingURL=icon.d.ts.map
|
package/dist/ui/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/ui/icon.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/ui/icon.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAO,MAAM,KAAK,CAAC;AAGtC,OAAO,EAAiC,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG9F,MAAM,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM,GAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WA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
|
|
8
8
|
import { isObject } from '../common/utils';
|
|
9
|
-
import { LitElement,
|
|
10
|
-
import { styleMap } from 'lit-html/directives/style-map.js';
|
|
9
|
+
import { LitElement, css } from 'lit';
|
|
11
10
|
import { customElement, property } from 'lit/decorators.js';
|
|
12
11
|
import constants from '../constants';
|
|
13
|
-
import { config } from '@fortawesome/fontawesome-svg-core';
|
|
12
|
+
import { config, icon, layer } from '@fortawesome/fontawesome-svg-core';
|
|
13
|
+
import { style } from './icon.style';
|
|
14
14
|
let Icon = Icon_1 = class Icon extends LitElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
this._icon = { icon: 'question-circle' };
|
|
18
17
|
this.fixedWidth = false;
|
|
19
|
-
this.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</og-fa-icon>
|
|
32
|
-
</og-fa-layers>
|
|
33
|
-
` : html `
|
|
34
|
-
<og-fa-icon
|
|
35
|
-
.size="${this._icon.size}"
|
|
36
|
-
.icon="${this.mainIcon}"
|
|
37
|
-
style="${styleMap({ color: this._icon.color })}"
|
|
38
|
-
.transform="${{ rotate: this._icon.rotation ?? 0 }}"
|
|
39
|
-
?fixedWidth="${this.fixedWidth}">
|
|
40
|
-
</og-fa-icon>
|
|
41
|
-
`) : html `
|
|
42
|
-
<og-fa-icon .size="${this._icon.size}" ?fixedWidth="${this.fixedWidth}"></og-fa-icon>
|
|
43
|
-
`;
|
|
18
|
+
this.spin = false;
|
|
19
|
+
this.reverseSpin = false;
|
|
20
|
+
this.flip = false;
|
|
21
|
+
this.pulse = false;
|
|
22
|
+
this.spinPulse = false;
|
|
23
|
+
this.bounce = false;
|
|
24
|
+
this.shake = false;
|
|
25
|
+
this.beat = false;
|
|
26
|
+
this.fade = false;
|
|
27
|
+
this.beatFade = false;
|
|
28
|
+
this.pullLeft = false;
|
|
29
|
+
this.pullRight = false;
|
|
44
30
|
}
|
|
45
|
-
get iconSet() { return Icon_1.defaultIconSet || config.styleDefault; }
|
|
46
|
-
get statusIconSet() { return Icon_1.defaultStatusIconSet || config.styleDefault; }
|
|
47
31
|
set icon(value) {
|
|
48
32
|
this._icon = (isObject(value) ? value : { icon: value });
|
|
49
33
|
this.requestUpdate();
|
|
50
34
|
}
|
|
51
35
|
get icon() { return this._icon; }
|
|
52
|
-
get
|
|
53
|
-
|
|
36
|
+
get iconName() {
|
|
37
|
+
if (!this._icon || !this._icon.icon)
|
|
38
|
+
return null;
|
|
39
|
+
return Array.isArray(this._icon.icon) ? this._icon.icon[1] : this._icon.icon;
|
|
40
|
+
}
|
|
41
|
+
get prefix() {
|
|
42
|
+
return (Array.isArray(this._icon.icon) ? this._icon.icon[0] : (Icon_1.defaultIconSet || config.styleDefault));
|
|
43
|
+
}
|
|
44
|
+
get iconSize() {
|
|
45
|
+
return this.size || this._icon.size || 'sm';
|
|
46
|
+
}
|
|
47
|
+
get iconColor() {
|
|
48
|
+
return this.color || this._icon.color;
|
|
49
|
+
}
|
|
50
|
+
get statusIconName() {
|
|
51
|
+
if (!this._icon?.statusIcon)
|
|
52
|
+
return null;
|
|
53
|
+
return Array.isArray(this._icon.statusIcon) ? this._icon.statusIcon[1] : this._icon.statusIcon;
|
|
54
|
+
}
|
|
55
|
+
get statusIconPrefix() {
|
|
56
|
+
if (!this._icon?.statusIcon)
|
|
57
|
+
return null;
|
|
58
|
+
return Array.isArray(this._icon.statusIcon) ? this._icon.statusIcon[0] : this.prefix;
|
|
59
|
+
}
|
|
60
|
+
get statusIconColor() {
|
|
61
|
+
return this._icon.statusColor || this.iconColor;
|
|
62
|
+
}
|
|
63
|
+
createMainIcon() {
|
|
64
|
+
return icon({ prefix: this.prefix, iconName: this.iconName }, { classes: [
|
|
65
|
+
`fa-${this.iconSize}`,
|
|
66
|
+
this.fixedWidth ? 'fa-fw' : null,
|
|
67
|
+
this.reverseSpin ? 'fa-spin-reverse' : this.spin ? 'fa-spin' : null,
|
|
68
|
+
this.pulse ? 'fa-pulse' : null,
|
|
69
|
+
this.flip ? 'fa-flip' : null,
|
|
70
|
+
this.bounce ? 'fa-bounce' : null,
|
|
71
|
+
this.shake ? 'fa-shake' : null,
|
|
72
|
+
this.beat ? 'fa-beat' : null,
|
|
73
|
+
this.fade ? 'fa-fade' : null,
|
|
74
|
+
this.beatFade ? 'fa-beat-fade' : null,
|
|
75
|
+
this.pullLeft ? 'fa-pull-left' : this.pullRight ? 'fa-pull-right' : null,
|
|
76
|
+
].filter(c => c) });
|
|
77
|
+
}
|
|
78
|
+
createLayeredIcon() {
|
|
79
|
+
const mainIcon = this.createMainIcon();
|
|
80
|
+
const statusIcon = icon({ prefix: this.statusIconPrefix, iconName: this.statusIconName }, {
|
|
81
|
+
classes: ['status-icon'],
|
|
82
|
+
transform: {
|
|
83
|
+
size: 6,
|
|
84
|
+
x: 6,
|
|
85
|
+
y: 5
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const layeredIcon = layer((push) => {
|
|
89
|
+
push(mainIcon);
|
|
90
|
+
push(statusIcon);
|
|
91
|
+
}, {
|
|
92
|
+
classes: [
|
|
93
|
+
`fa-${this.iconSize}`,
|
|
94
|
+
this.fixedWidth ? 'fa-fw' : null
|
|
95
|
+
].filter(c => c)
|
|
96
|
+
});
|
|
97
|
+
return layeredIcon;
|
|
98
|
+
}
|
|
99
|
+
updated() {
|
|
100
|
+
if (this.iconColor) {
|
|
101
|
+
this.style.color = this.iconColor;
|
|
102
|
+
}
|
|
103
|
+
const html = (this.statusIconName ? this.createLayeredIcon() : this.createMainIcon()).html;
|
|
104
|
+
this.shadowRoot.innerHTML = html.length ? html[0] : '';
|
|
105
|
+
}
|
|
54
106
|
};
|
|
55
|
-
Icon.
|
|
107
|
+
// get iconSet(): string { return Icon.defaultIconSet || config.styleDefault }
|
|
108
|
+
// get statusIconSet(): string { return Icon.defaultStatusIconSet || config.styleDefault }
|
|
109
|
+
Icon.styles = [style, css `
|
|
110
|
+
* {
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host {
|
|
115
|
+
display: inline-block;
|
|
116
|
+
line-height: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.svg-inline--fa {
|
|
120
|
+
box-sizing: content-box;
|
|
121
|
+
display: var(--fa-display, inline-block);
|
|
122
|
+
height: 1em;
|
|
123
|
+
overflow: visible;
|
|
124
|
+
vertical-align: -0.125em;
|
|
125
|
+
width: var(--fa-width, 1.25em);
|
|
126
|
+
}
|
|
127
|
+
|
|
56
128
|
.status-icon {
|
|
57
129
|
color: var(--og-accent-color);
|
|
58
130
|
}
|
|
59
|
-
|
|
131
|
+
`];
|
|
60
132
|
__decorate([
|
|
61
133
|
property({ type: Boolean })
|
|
62
134
|
], Icon.prototype, "fixedWidth", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: Boolean })
|
|
137
|
+
], Icon.prototype, "spin", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ type: Boolean })
|
|
140
|
+
], Icon.prototype, "reverseSpin", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Boolean })
|
|
143
|
+
], Icon.prototype, "flip", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: Boolean })
|
|
146
|
+
], Icon.prototype, "pulse", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ type: Boolean })
|
|
149
|
+
], Icon.prototype, "spinPulse", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: Boolean })
|
|
152
|
+
], Icon.prototype, "bounce", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: Boolean })
|
|
155
|
+
], Icon.prototype, "shake", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: Boolean })
|
|
158
|
+
], Icon.prototype, "beat", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Boolean })
|
|
161
|
+
], Icon.prototype, "fade", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: Boolean })
|
|
164
|
+
], Icon.prototype, "beatFade", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: Boolean })
|
|
167
|
+
], Icon.prototype, "pullLeft", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: Boolean })
|
|
170
|
+
], Icon.prototype, "pullRight", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: String })
|
|
173
|
+
], Icon.prototype, "size", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property({ type: String })
|
|
176
|
+
], Icon.prototype, "color", void 0);
|
|
63
177
|
__decorate([
|
|
64
178
|
property()
|
|
65
179
|
], Icon.prototype, "icon", null);
|
package/dist/ui/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/ui/icon.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAYpD,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,UAAU;IAA7B;;QAcE,UAAK,GAAa,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;QAGpD,eAAU,GAAG,KAAK,CAAC;QAYnB,WAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC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KAAsB,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;IAEjD,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;IAC5G,IAAI,UAAU,KAAK,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA,CAAC,CAAC;;AAnBzH,WAAM,GAAG,GAAG,CAAA;;;;EAIlB,AAJY,CAIX;AAKF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;wCACP;AAGnB;IADC,QAAQ,EAAE;gCAIV;AAvBW,IAAI;IADhB,aAAa,CAAC,GAAG,SAAS,CAAC,MAAM,OAAO,CAAC;GAC7B,IAAI,CAuDhB","sourcesContent":["import { isObject } from '../common/utils';\nimport { LitElement, html, css } from 'lit';\nimport { styleMap } from 'lit-html/directives/style-map.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport constants from '../constants';\nimport { config } from '@fortawesome/fontawesome-svg-core';\n\nexport type IconSpec = {\n\ticon: string|[string, string],\n\tcolor?: string,\n\tstatusIcon?: string|[string, string],\n\tstatusColor?: string,\n\tsize?: '' | 'lg' | 'xs' | 'sm' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | null,\n\trotation?: number,\n};\n\n@customElement(`${constants.PREFIX}-icon`)\nexport class Icon extends LitElement {\n\n\tstatic defaultIconSet: string;\n\tstatic defaultStatusIconSet: string;\n\t\n\tget iconSet(): string { return Icon.defaultIconSet || config.styleDefault }\n\tget statusIconSet(): string { return Icon.defaultStatusIconSet || config.styleDefault }\n\n\tstatic styles = css`\n\t\t.status-icon {\n\t\t\tcolor: var(--og-accent-color);\n\t\t}\n\t`;\n\n\tprivate _icon: IconSpec = {icon: 'question-circle'};\n\n\t@property({type: Boolean})\n\tfixedWidth = false;\n\n\t@property()\n\tset icon(value: IconSpec|string) { \n\t\tthis._icon = (isObject(value) ? value : {icon: value}) as IconSpec;\n\t\tthis.requestUpdate();\n\t}\n\tget icon(): IconSpec|string { return this._icon }\n\n\tget mainIcon() { return Array.isArray(this._icon.icon) ? this._icon.icon : [this.iconSet, this._icon.icon] }\n\tget statusIcon() { return Array.isArray(this._icon.statusIcon) ? this._icon.statusIcon : [this.iconSet, this._icon.statusIcon] }\n\n\trender = () => this.icon ? (this._icon.statusIcon ? html`\n\t\t<og-fa-layers .size=\"${this._icon.size}\" ?fixedWidth=\"${this.fixedWidth}\">\n\t\t\t<og-fa-icon \n\t\t\t\t.icon=\"${this.mainIcon}\"\n\t\t\t\tstyle=\"${styleMap({color: this._icon.color})}\"\n\t\t\t\t.transform=\"${{rotate: this._icon.rotation ?? 0}}\">\n\t\t\t</og-fa-icon>\n\t\t\t<og-fa-icon\n\t\t\t\tclass=\"status-icon\"\n\t\t\t\t.icon=\"${this.statusIcon}\"\n\t\t\t\tstyle=\"${styleMap({color: this._icon.statusColor})}\"\n\t\t\t\ttransform=\"right-6 down-5 shrink-6\">\n\t\t\t</og-fa-icon>\n\t\t</og-fa-layers>\n\t` : html`\n\t\t<og-fa-icon \n\t\t\t.size=\"${this._icon.size}\"\n\t\t\t.icon=\"${this.mainIcon}\"\n\t\t\tstyle=\"${styleMap({color: this._icon.color})}\"\n\t\t\t.transform=\"${{rotate: this._icon.rotation ?? 0}}\"\n\t\t\t?fixedWidth=\"${this.fixedWidth}\">\n\t\t</og-fa-icon>\n\t`) : html`\n\t\t<og-fa-icon .size=\"${this._icon.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AAC;mCACX;AAGd;IADC,QAAQ,EAAE;gCAIV;AAnFW,IAAI;IADhB,aAAa,CAAC,GAAG,SAAS,CAAC,MAAM,OAAO,CAAC;GAC7B,IAAI,CA6KhB","sourcesContent":["import { isObject } from '../common/utils';\nimport { LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport constants from '../constants';\nimport { config, icon, layer, IconName, IconPrefix } from '@fortawesome/fontawesome-svg-core';\nimport { style } from './icon.style';\n\nexport type IconSpec = {\n\ticon: string|[string, string],\n\tcolor?: string,\n\tstatusIcon?: string|[string, string],\n\tstatusColor?: string,\n\tsize?: '' | 'lg' | 'xs' | 'sm' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | null,\n\trotation?: number,\n};\n\n@customElement(`${constants.PREFIX}-icon`)\nexport class Icon extends LitElement {\n\n\tstatic defaultIconSet: string;\n\tstatic defaultStatusIconSet: string;\n\t\n\t// get iconSet(): string { return Icon.defaultIconSet || config.styleDefault }\n\t// get statusIconSet(): string { return Icon.defaultStatusIconSet || config.styleDefault }\n\n\tstatic styles = [style, css`\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: 1;\n\t\t}\n\n\t\t.svg-inline--fa {\n\t\t\tbox-sizing: content-box;\n\t\t\tdisplay: var(--fa-display, inline-block);\n\t\t\theight: 1em;\n\t\t\toverflow: visible;\n\t\t\tvertical-align: -0.125em;\n\t\t\twidth: var(--fa-width, 1.25em);\n\t\t}\n\n\t\t.status-icon {\n\t\t\tcolor: var(--og-accent-color);\n\t\t}\n\t`];\n\n\tprivate _icon: IconSpec;\n\n\t@property({type: Boolean})\n\tfixedWidth = false;\n\n\t@property({type: Boolean})\n\tspin = false;\n\n\t@property({type: Boolean})\n\treverseSpin = false;\n\n\t@property({type: Boolean})\n\tflip = false;\n\n\t@property({type: Boolean})\n\tpulse = false;\n\n\t@property({type: Boolean})\n\tspinPulse = false;\n\n\t@property({type: Boolean})\n\tbounce = false;\n\n\t@property({type: Boolean})\n\tshake = false;\n\n\t@property({type: Boolean})\n\tbeat = false;\n\n\t@property({type: Boolean})\n\tfade = false;\n\n\t@property({type: Boolean})\n\tbeatFade = false;\n\n\t@property({type: Boolean})\n\tpullLeft = false;\n\n\t@property({type: Boolean})\n\tpullRight = false;\n\n\t@property({type: String})\n\tsize: string;\n\n\t@property({type: String})\n\tcolor: string;\n\n\t@property()\n\tset icon(value: IconSpec|string) { \n\t\tthis._icon = (isObject(value) ? value : {icon: value}) as IconSpec;\n\t\tthis.requestUpdate();\n\t}\n\tget icon(): IconSpec|string { return this._icon }\n\n\tget iconName() {\n\t\tif (!this._icon || !this._icon.icon) return null;\n\t\treturn Array.isArray(this._icon.icon) ? this._icon.icon[1] : this._icon.icon;\n\t}\n\n\tget prefix() {\n\t\treturn (Array.isArray(this._icon.icon) ? this._icon.icon[0] : (Icon.defaultIconSet || config.styleDefault)) as IconPrefix;\n\t}\n\n\tget iconSize() {\n\t\treturn this.size || this._icon.size || 'sm';\n\t}\n\n\tget iconColor() {\n\t\treturn this.color || this._icon.color;\n\t}\n\n\tget statusIconName() {\n\t\tif (!this._icon?.statusIcon) return null;\n\t\treturn Array.isArray(this._icon.statusIcon) ? this._icon.statusIcon[1] : this._icon.statusIcon;\n\t}\n\n\tget statusIconPrefix() {\n\t\tif (!this._icon?.statusIcon) return null;\n\t\treturn Array.isArray(this._icon.statusIcon) ? this._icon.statusIcon[0] : this.prefix;\n\t}\n\n\tget statusIconColor() {\n\t\treturn this._icon.statusColor || this.iconColor;\n\t}\n\n\tcreateMainIcon() {\n\t\treturn icon(\n\t\t\t{prefix: this.prefix, iconName: this.iconName as IconName},\n\t\t\t{classes: [\n\t\t\t\t`fa-${this.iconSize}`, \n\t\t\t\tthis.fixedWidth ? 'fa-fw' : null,\n\t\t\t\tthis.reverseSpin ? 'fa-spin-reverse' : this.spin ? 'fa-spin' : null,\n\t\t\t\tthis.pulse ? 'fa-pulse' : null,\n\t\t\t\tthis.flip ? 'fa-flip' : null,\n\t\t\t\tthis.bounce ? 'fa-bounce' : null,\n\t\t\t\tthis.shake ? 'fa-shake' : null,\n\t\t\t\tthis.beat ? 'fa-beat' : null,\n\t\t\t\tthis.fade ? 'fa-fade' : null,\n\t\t\t\tthis.beatFade ? 'fa-beat-fade' : null,\n\t\t\t\tthis.pullLeft ? 'fa-pull-left' : this.pullRight ? 'fa-pull-right' : null,\n\t\t\t].filter(c => c)}\n\t\t);\n\t}\n\n\tcreateLayeredIcon() {\n\t\tconst mainIcon = this.createMainIcon();\n\n\t\tconst statusIcon = icon(\n\t\t\t{prefix: this.statusIconPrefix as IconPrefix, iconName: this.statusIconName as IconName},\n\t\t\t{\n\t\t\t\tclasses: ['status-icon'],\n\t\t\t\ttransform: {\n\t\t\t\t\tsize: 6,\n\t\t\t\t\tx: 6,\n\t\t\t\t\ty: 5\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tconst layeredIcon = layer((push) => {\n\t\t\tpush(mainIcon);\n\t\t\tpush(statusIcon);\n\t\t}, {\n\t\t\tclasses: [\n\t\t\t\t`fa-${this.iconSize}`,\n\t\t\t\tthis.fixedWidth ? 'fa-fw' : null\n\t\t\t].filter(c => c)\n\t\t});\n\n\t\treturn layeredIcon;\n\t}\n\n\tupdated() {\n\t\tif (this.iconColor) {\n\t\t\tthis.style.color = this.iconColor;\n\t\t}\n\n\t\tconst html = (this.statusIconName ? this.createLayeredIcon() : this.createMainIcon()).html;\n\t\tthis.shadowRoot.innerHTML = html.length ? html[0] : '';\n\t}\n\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.style.d.ts","sourceRoot":"","sources":["../../src/ui/icon.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAyiBjB,CAAC"}
|