@omegagrid/core 0.6.61 → 0.6.62
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/utils.d.ts +8 -0
- package/dist/common/utils.d.ts.map +1 -1
- package/dist/common/utils.js +15 -0
- package/dist/common/utils.js.map +1 -1
- package/dist/model/componentStore.d.ts +1 -0
- package/dist/model/componentStore.d.ts.map +1 -1
- package/dist/model/componentStore.js +4 -0
- package/dist/model/componentStore.js.map +1 -1
- package/dist/themes/definitions/tmDark.d.ts.map +1 -1
- package/dist/themes/definitions/tmDark.js +1 -0
- package/dist/themes/definitions/tmDark.js.map +1 -1
- package/dist/themes/definitions/tmLight.d.ts.map +1 -1
- package/dist/themes/definitions/tmLight.js +4 -3
- package/dist/themes/definitions/tmLight.js.map +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +1 -0
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/button.style.d.ts.map +1 -1
- package/dist/ui/button.style.js +1 -0
- package/dist/ui/button.style.js.map +1 -1
- package/dist/ui/colorpicker.js +5 -5
- package/dist/ui/colorpicker.js.map +1 -1
- package/dist/ui/dropdown.d.ts.map +1 -1
- package/dist/ui/dropdown.js +8 -2
- package/dist/ui/dropdown.js.map +1 -1
- package/dist/ui/fileInput.style.d.ts.map +1 -1
- package/dist/ui/fileInput.style.js +1 -0
- package/dist/ui/fileInput.style.js.map +1 -1
- package/dist/ui/input.style.d.ts.map +1 -1
- package/dist/ui/input.style.js +1 -0
- package/dist/ui/input.style.js.map +1 -1
- package/dist/ui/menu.style.d.ts.map +1 -1
- package/dist/ui/menu.style.js +1 -0
- package/dist/ui/menu.style.js.map +1 -1
- package/dist/ui/slider.style.d.ts.map +1 -1
- package/dist/ui/slider.style.js +1 -0
- package/dist/ui/slider.style.js.map +1 -1
- package/dist/ui/switch.style.d.ts.map +1 -1
- package/dist/ui/switch.style.js +8 -0
- package/dist/ui/switch.style.js.map +1 -1
- package/dist/ui/tooltip.style.d.ts.map +1 -1
- package/dist/ui/tooltip.style.js +4 -0
- package/dist/ui/tooltip.style.js.map +1 -1
- package/package.json +2 -2
package/dist/common/utils.d.ts
CHANGED
|
@@ -19,4 +19,12 @@ export declare function isControlCharacter(charCode: string): boolean;
|
|
|
19
19
|
export declare function escapeRegExp(value: string): string;
|
|
20
20
|
export declare function intersect<T>(arr1: T[], arr2: T[]): T[];
|
|
21
21
|
export declare function rectIntersect(r1: Rect, r2: Rect): Rect;
|
|
22
|
+
/**
|
|
23
|
+
* Binds a method to a context and optionally executes a callback with the result.
|
|
24
|
+
* @param {any} context - The context to bind the method to.
|
|
25
|
+
* @param {Function} method - The method to bind.
|
|
26
|
+
* @param {Function} [callback] - Optional callback to execute with the result of the method.
|
|
27
|
+
* @returns {Function} A new function that, when called, will execute the method with the bound context.
|
|
28
|
+
*/
|
|
29
|
+
export declare function bind<T extends (...args: any[]) => any>(context: any, method: T, callback?: (result: ReturnType<T>, ...args: Parameters<T>) => void): (...args: Parameters<T>) => ReturnType<T>;
|
|
22
30
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/common/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAExC,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,oBAEpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,WAExC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,mBAEtC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,WAW5C;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,mBAEtC;AAED,wBAAgB,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E,EAAE,EAAE,IAAI,GAAG,IAAI,CAWtD;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACrD,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,CAAC,EACT,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,GAChE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAM3C"}
|
package/dist/common/utils.js
CHANGED
|
@@ -118,4 +118,19 @@ export function rectIntersect(r1, r2) {
|
|
|
118
118
|
h: Math.min(r1.y + r1.h, r2.y + r2.h) - Math.max(r1.y, r2.y)
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Binds a method to a context and optionally executes a callback with the result.
|
|
123
|
+
* @param {any} context - The context to bind the method to.
|
|
124
|
+
* @param {Function} method - The method to bind.
|
|
125
|
+
* @param {Function} [callback] - Optional callback to execute with the result of the method.
|
|
126
|
+
* @returns {Function} A new function that, when called, will execute the method with the bound context.
|
|
127
|
+
*/
|
|
128
|
+
export function bind(context, method, callback) {
|
|
129
|
+
return function (...args) {
|
|
130
|
+
const result = method.apply(context, args);
|
|
131
|
+
if (typeof callback === 'function')
|
|
132
|
+
callback(result, ...args);
|
|
133
|
+
return result;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
121
136
|
//# sourceMappingURL=utils.js.map
|
package/dist/common/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common/utils.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,0CAA0C;AAI1C,MAAM,UAAU,MAAM,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,SAAS,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AM,UAAU,aAAa,CAAC,EAAQ,EAAE,EAAQ;IAC/C,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QAC9F,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO;QACN,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvB,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KAC5D,CAAC;AACH,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-prototype-builtins */\n\nimport { Matrix, Rect } from \"../types\";\n\nexport function isBool(value: unknown) {\n\treturn typeof value === 'boolean';\n}\n\nexport function isObject(value: unknown) {\n\treturn (value && typeof value === 'object' && !Array.isArray(value));\n}\n\nexport function isFunction(value: unknown) {\n\treturn (value && typeof value === 'function');\n}\n\nexport function isString(value: unknown) {\n\treturn typeof value == 'string';\n}\n\nexport function isNumericString(value: string) {\n\tlet decimalSeparators = 0;\n\tfor (let i = 0; i < value.length; i++) {\n\t\tconst char = value.charAt(i);\n\t\tif (char === '.' || char === ',') {\n\t\t\tif (++decimalSeparators > 1) return false;\n\t\t} else if (char < '0' || char > '9') {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nexport function strToNum(str: string) {\n\treturn parseFloat(str.replace ? str.replace(',', '.') : str);\n}\n\nexport function isNumber(value: unknown) {\n\treturn typeof value === 'number';\n}\n \nexport function isCharLetter(char: string) {\n\treturn char.toLowerCase() !== char.toUpperCase();\n}\n\nexport function ifNull<T>(value: T|null, def: T) {\n\treturn value == null ? def: value;\n}\n\nexport function mergeDeep<T>(...sources: Partial<T>[]): T {\n\tconst result: any = {};\n\n\tsources.forEach(source => {\n\t\tfor (const key in source) {\n\t\t\tif (source.hasOwnProperty(key)) {\n\t\t\t\tconst sourceValue = (source as any)[key];\n\t\t\t\tconst resultValue = result[key];\n\n\t\t\t\tif (Array.isArray(sourceValue)) {\n\t\t\t\t\tresult[key] = [...sourceValue];\n\t\t\t\t} else if (typeof sourceValue === 'object' && sourceValue !== null) {\n\t\t\t\t\tresult[key] = mergeDeep(resultValue || {}, sourceValue);\n\t\t\t\t} else {\n\t\t\t\t\tresult[key] = sourceValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn result as T;\n}\n\nexport function cloneDeep<T>(obj: T) {\n\treturn mergeDeep<T>({}, obj);\n}\n\nexport function clone(obj: any) {\n\treturn Object.assign({}, obj);\n}\n\nexport function trim(value: string, char: string) {\n\tif (char === ']') char = '\\\\]';\n\tif (char === '^') char = '\\\\^';\n\tif (char === '\\\\') char = '\\\\\\\\';\n\treturn value.replace(new RegExp('^[' + char + ']+|[' + char + ']+$', 'g'), '');\n}\n\nexport function minmax(values: number[]) : [number, number] {\n\tlet min: number = null, max: number = null;\n\tvalues.forEach(v => {\n\t\tif (!isNaN(v) && v != null) {\n\t\t\tmin = Math.min(min == null ? Number.MAX_SAFE_INTEGER : min, v);\n\t\t\tmax = Math.max(max == null ? Number.MIN_SAFE_INTEGER : max, v);\n\t\t}\n\t});\n\treturn [min, max];\n}\n\nexport function minmax2d(...values: Matrix<number>[]) : [number, number] {\n\tlet min: number = null, max: number = null;\n\tvalues.forEach(matrice => matrice.forEach(row => row.forEach(v => {\n\t\tif (!isNaN(v) && v != null) {\n\t\t\tmin = Math.min(min == null ? Number.MAX_SAFE_INTEGER : min, v);\n\t\t\tmax = Math.max(max == null ? Number.MIN_SAFE_INTEGER : max, v);\n\t\t}\n\t})));\n\treturn [min, max];\n}\n\nexport function removeAccents(str: string) {\n\treturn str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\n\nconst controlCharacters = [\"Shift\", \"Escape\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"Enter\"];\n\nexport function isControlCharacter(charCode: string) {\n\treturn controlCharacters.includes(charCode);\n}\n\nexport function escapeRegExp(value: string) {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/gi, '\\\\$&');\n}\n\nexport function intersect<T>(arr1: T[], arr2: T[]): T[] {\n\treturn arr1.filter(element => arr2.includes(element));\n}\n\nexport function rectIntersect(r1: Rect, r2: Rect): Rect {\n\tif (r1.x >= r2.x + r2.w || r2.x >= r1.x + r1.w || r1.y >= r2.y + r2.h || r2.y >= r1.y + r1.h) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tx: Math.max(r1.x, r2.x),\n\t\ty: Math.max(r1.y, r2.y),\n\t\tw: Math.min(r1.x + r1.w, r2.x + r2.w) - Math.max(r1.x, r2.x),\n\t\th: Math.min(r1.y + r1.h, r2.y + r2.h) - Math.max(r1.y, r2.y)\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sour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ACZ,MAAS,EACT,QAAkE;IAElE,OAAO,UAAU,GAAG,IAAmB;QACtC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC3C,IAAI,OAAO,QAAQ,KAAK,UAAU;YAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC;IACf,CAAC,CAAC;AACH,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-prototype-builtins */\n\nimport { Matrix, Rect } from \"../types\";\n\nexport function isBool(value: unknown) {\n\treturn typeof value === 'boolean';\n}\n\nexport function isObject(value: unknown) {\n\treturn (value && typeof value === 'object' && !Array.isArray(value));\n}\n\nexport function isFunction(value: unknown) {\n\treturn (value && typeof value === 'function');\n}\n\nexport function isString(value: unknown) {\n\treturn typeof value == 'string';\n}\n\nexport function isNumericString(value: string) {\n\tlet decimalSeparators = 0;\n\tfor (let i = 0; i < value.length; i++) {\n\t\tconst char = value.charAt(i);\n\t\tif (char === '.' || char === ',') {\n\t\t\tif (++decimalSeparators > 1) return false;\n\t\t} else if (char < '0' || char > '9') {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nexport function strToNum(str: string) {\n\treturn parseFloat(str.replace ? str.replace(',', '.') : str);\n}\n\nexport function isNumber(value: unknown) {\n\treturn typeof value === 'number';\n}\n \nexport function isCharLetter(char: string) {\n\treturn char.toLowerCase() !== char.toUpperCase();\n}\n\nexport function ifNull<T>(value: T|null, def: T) {\n\treturn value == null ? def: value;\n}\n\nexport function mergeDeep<T>(...sources: Partial<T>[]): T {\n\tconst result: any = {};\n\n\tsources.forEach(source => {\n\t\tfor (const key in source) {\n\t\t\tif (source.hasOwnProperty(key)) {\n\t\t\t\tconst sourceValue = (source as any)[key];\n\t\t\t\tconst resultValue = result[key];\n\n\t\t\t\tif (Array.isArray(sourceValue)) {\n\t\t\t\t\tresult[key] = [...sourceValue];\n\t\t\t\t} else if (typeof sourceValue === 'object' && sourceValue !== null) {\n\t\t\t\t\tresult[key] = mergeDeep(resultValue || {}, sourceValue);\n\t\t\t\t} else {\n\t\t\t\t\tresult[key] = sourceValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn result as T;\n}\n\nexport function cloneDeep<T>(obj: T) {\n\treturn mergeDeep<T>({}, obj);\n}\n\nexport function clone(obj: any) {\n\treturn Object.assign({}, obj);\n}\n\nexport function trim(value: string, char: string) {\n\tif (char === ']') char = '\\\\]';\n\tif (char === '^') char = '\\\\^';\n\tif (char === '\\\\') char = '\\\\\\\\';\n\treturn value.replace(new RegExp('^[' + char + ']+|[' + char + ']+$', 'g'), '');\n}\n\nexport function minmax(values: number[]) : [number, number] {\n\tlet min: number = null, max: number = null;\n\tvalues.forEach(v => {\n\t\tif (!isNaN(v) && v != null) {\n\t\t\tmin = Math.min(min == null ? Number.MAX_SAFE_INTEGER : min, v);\n\t\t\tmax = Math.max(max == null ? Number.MIN_SAFE_INTEGER : max, v);\n\t\t}\n\t});\n\treturn [min, max];\n}\n\nexport function minmax2d(...values: Matrix<number>[]) : [number, number] {\n\tlet min: number = null, max: number = null;\n\tvalues.forEach(matrice => matrice.forEach(row => row.forEach(v => {\n\t\tif (!isNaN(v) && v != null) {\n\t\t\tmin = Math.min(min == null ? Number.MAX_SAFE_INTEGER : min, v);\n\t\t\tmax = Math.max(max == null ? Number.MIN_SAFE_INTEGER : max, v);\n\t\t}\n\t})));\n\treturn [min, max];\n}\n\nexport function removeAccents(str: string) {\n\treturn str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\n\nconst controlCharacters = [\"Shift\", \"Escape\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"Enter\"];\n\nexport function isControlCharacter(charCode: string) {\n\treturn controlCharacters.includes(charCode);\n}\n\nexport function escapeRegExp(value: string) {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/gi, '\\\\$&');\n}\n\nexport function intersect<T>(arr1: T[], arr2: T[]): T[] {\n\treturn arr1.filter(element => arr2.includes(element));\n}\n\nexport function rectIntersect(r1: Rect, r2: Rect): Rect {\n\tif (r1.x >= r2.x + r2.w || r2.x >= r1.x + r1.w || r1.y >= r2.y + r2.h || r2.y >= r1.y + r1.h) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tx: Math.max(r1.x, r2.x),\n\t\ty: Math.max(r1.y, r2.y),\n\t\tw: Math.min(r1.x + r1.w, r2.x + r2.w) - Math.max(r1.x, r2.x),\n\t\th: Math.min(r1.y + r1.h, r2.y + r2.h) - Math.max(r1.y, r2.y)\n\t};\n}\n\n/**\n * Binds a method to a context and optionally executes a callback with the result.\n * @param {any} context - The context to bind the method to.\n * @param {Function} method - The method to bind.\n * @param {Function} [callback] - Optional callback to execute with the result of the method.\n * @returns {Function} A new function that, when called, will execute the method with the bound context.\n */\nexport function bind<T extends (...args: any[]) => any>(\n\tcontext: any,\n\tmethod: T,\n\tcallback?: (result: ReturnType<T>, ...args: Parameters<T>) => void\n): (...args: Parameters<T>) => ReturnType<T> {\n\treturn function (...args: Parameters<T>): ReturnType<T> {\n\t\tconst result = method.apply(context, args);\n\t\tif (typeof callback === 'function') callback(result, ...args);\n\t\treturn result;\n\t};\n}\n"]}
|
|
@@ -7,5 +7,6 @@ export declare class ComponentStore<T extends HTMLElement = HTMLElement> {
|
|
|
7
7
|
remove(id: ComponentId): this;
|
|
8
8
|
has(id: ComponentId): boolean;
|
|
9
9
|
clear(): void;
|
|
10
|
+
forEach(callback: (item: T, id: ComponentId) => void): this;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=componentStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentStore.d.ts","sourceRoot":"","sources":["../../src/model/componentStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,qBAAa,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;aAIlC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAFxD,SAAgB,KAAK,sBAA6B;gBAEtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAElD,GAAG,CAAC,EAAE,EAAE,WAAW;IAKzB,MAAM,CAAC,EAAE,EAAE,WAAW;IAKtB,GAAG,CAAC,EAAE,EAAE,WAAW;IAInB,KAAK;
|
|
1
|
+
{"version":3,"file":"componentStore.d.ts","sourceRoot":"","sources":["../../src/model/componentStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,qBAAa,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;aAIlC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAFxD,SAAgB,KAAK,sBAA6B;gBAEtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAElD,GAAG,CAAC,EAAE,EAAE,WAAW;IAKzB,MAAM,CAAC,EAAE,EAAE,WAAW;IAKtB,GAAG,CAAC,EAAE,EAAE,WAAW;IAInB,KAAK;IAIL,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI;CAKpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentStore.js","sourceRoot":"","sources":["../../src/model/componentStore.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IAI1B,YAA4B,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;QAFxC,UAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEU,CAAC;IAE7D,KAAK,CAAC,GAAG,CAAC,EAAe;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,EAAe;QACrB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,GAAG,CAAC,EAAe;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CAED","sourcesContent":["import { ComponentFactory, ComponentId } from \"../types\";\n\nexport class ComponentStore<T extends HTMLElement = HTMLElement> {\n\n\tpublic readonly items = new Map<ComponentId, T>();\n\n\tconstructor(public readonly factory: ComponentFactory<T>) { }\n\n\tasync get(id: ComponentId) {\n\t\tif (!this.items.has(id)) this.items.set(id, await this.factory(id));\n\t\treturn this.items.get(id);\n\t}\n\n\tremove(id: ComponentId) {\n\t\tthis.items.delete(id);\n\t\treturn this;\n\t}\n\n\thas(id: ComponentId) {\n\t\treturn this.items.has(id);\n\t}\n\n\tclear() {\n\t\tthis.items.clear();\n\t}\n\n}"]}
|
|
1
|
+
{"version":3,"file":"componentStore.js","sourceRoot":"","sources":["../../src/model/componentStore.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IAI1B,YAA4B,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;QAFxC,UAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEU,CAAC;IAE7D,KAAK,CAAC,GAAG,CAAC,EAAe;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,EAAe;QACrB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,GAAG,CAAC,EAAe;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,CAAC,QAA4C;QACnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;CAED","sourcesContent":["import { ComponentFactory, ComponentId } from \"../types\";\n\nexport class ComponentStore<T extends HTMLElement = HTMLElement> {\n\n\tpublic readonly items = new Map<ComponentId, T>();\n\n\tconstructor(public readonly factory: ComponentFactory<T>) { }\n\n\tasync get(id: ComponentId) {\n\t\tif (!this.items.has(id)) this.items.set(id, await this.factory(id));\n\t\treturn this.items.get(id);\n\t}\n\n\tremove(id: ComponentId) {\n\t\tthis.items.delete(id);\n\t\treturn this;\n\t}\n\n\thas(id: ComponentId) {\n\t\treturn this.items.has(id);\n\t}\n\n\tclear() {\n\t\tthis.items.clear();\n\t}\n\n\tforEach(callback: (item: T, id: ComponentId) => void) {\n\t\tthis.items.forEach(callback);\n\t\treturn this;\n\t}\n\t\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmDark.d.ts","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tmDark.d.ts","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;wBA2F/B,KAAK;AAzFV,wBAyFW"}
|
|
@@ -6,6 +6,7 @@ export default {
|
|
|
6
6
|
definition: {
|
|
7
7
|
'font-size': dom.numToPixels(constants.FONT_SIZE),
|
|
8
8
|
'font-family': 'verdana',
|
|
9
|
+
'base-radius': '3px',
|
|
9
10
|
'button-color': 'var(--og-accent-color)',
|
|
10
11
|
'button-background-color': '#1e1e1e',
|
|
11
12
|
'button-background-color-highlight': '#3a3a3a',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmDark.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,0BAA0B;QAC1B,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,SAAS;QAC/B,sBAAsB,EAAE,SAAS;QACjC,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;QACzB,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB,gBAAgB,EAAE,SAAS;QAC3B,iBAAiB,EAAE,SAAS;QAC5B,aAAa,EAAE,mBAAmB;QAClC,kBAAkB,EAAE,SAAS;QAC7B,yBAAyB,EAAE,SAAS;QACpC,0BAA0B,EAAE,SAAS;QACrC,kBAAkB,EA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BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'dark',\n\ttype: 'dark',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#1e1e1e',\n\t\t'button-background-color-highlight': '#3a3a3a',\n\t\t//'background': '#1e1e1e',\n\t\t'background-color': '#181818',\n\t\t'background-color-2': '#1f1f1f',\n\t\t'background-color-3': '#292929',\n\t\t'text-highlight-color': '#FFFF00',\n\t\t'text-color': '#9b9b9b',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#ffffff',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#3a3a3a',\n\t\t'border-color': '#3a3a3a',\n\t\t'border-color-2': '#2a2a2a',\n\t\t'cell-background': '#1e1e1e',\n\t\t'cell-border': '1px solid #3a3a3a',\n\t\t'hcell-background': '#2e2e2e',\n\t\t'slider-background-color': '#272727',\n\t\t'slider-background-active': '#313131',\n\t\t'slider-bar-color': '#494949',\n\t\t'slider-bar-active': '#494949',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#3F3F3F',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#000000',\n\t\t'inset-shadow-color': '#000000',\n\t\n\t\t'commands-color': '#ffffff',\n\t\t'commands-background': '#181818',\n\t\t'commands-header-background': '#363636',\n\t\t'commands-input-background': '#363636',\n\t\t'commands-shadow': '#151515',\n\t\n\t\t'dialog-color': '#ffffff',\n\t\t'dialog-background': '#181818',\n\t\t'dialog-header-background': '#363636',\n\t\t'dialog-shadow': '#151515',\n\t\t\n\t\t'tab-border-color': '#2a2a2a',\n\t\t'tab-background-color': '#181818',\n\t\t'tab-panel-background-color': '#181818',\n\t\t'tab-background-color-active': '#1f1f1f',\n\t\t\n\t\t'bucket-tab-background-color': '#2d2d2d',\n\t\t'bucket-tab-panel-background-color': '#252526',\n\t\t'bucket-tab-background-color-active': '#1f1f1f',\n\t\t'bucket-right-background-color': '#1e1e1e',\n\t\t'bucket-border-color': '#2a2a2a',\n\t\t'bucket-center-background-color': '#181818',\n\t\t'bucket-left-background-color': '#181818',\n\t\t'bucket-top-background-color': '#181818',\n\t\t'bucket-sidebar-background-color': '#272727',\n\t\t\n\t\t'form-background-color': '#323233',\n\t\n\t\t'colortype-yellow-background-color': '#655600',\n\t\t'colortype-yellow-border-color': '#9b8100',\n\t\t'colortype-yellow-text-color': '#ffffff',\n\t\n\t\t'colortype-green-background-color': '#015d00',\n\t\t'colortype-green-border-color': '#00b420',\n\t\t'colortype-green-text-color': '#ffffff',\n\t\n\t\t'colortype-red-background-color': '#730505',\n\t\t'colortype-red-border-color': '#fb1515',\n\t\t'colortype-red-text-color': '#ffffff',\n\t\n\t\t'colortype-blue-background-color': '#002265',\n\t\t'colortype-blue-border-color': '#007cdc',\n\t\t'colortype-blue-text-color': '#ffffff',\n\t\n\t\t'colortype-gray-background-color': '#434343',\n\t\t'colortype-gray-border-color': '#6e6e6e',\n\t\t'colortype-gray-text-color': '#ffffff',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#474747',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
|
|
1
|
+
{"version":3,"file":"tmDark.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmDark.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,C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E,SAAS;QAC1C,qBAAqB,EAAE,SAAS;QAChC,gCAAgC,EAAE,SAAS;QAC3C,8BAA8B,EAAE,SAAS;QACzC,6BAA6B,EAAE,SAAS;QACxC,iCAAiC,EAAE,SAAS;QAE5C,uBAAuB,EAAE,SAAS;QAElC,mCAAmC,EAAE,SAAS;QAC9C,+BAA+B,EAAE,SAAS;QAC1C,6BAA6B,EAAE,SAAS;QAExC,kCAAkC,EAAE,SAAS;QAC7C,8BAA8B,EAAE,SAAS;QACzC,4BAA4B,EAAE,SAAS;QAEvC,gCAAgC,EAAE,SAAS;QAC3C,4BAA4B,EAAE,SAAS;QACvC,0BAA0B,EAAE,SAAS;QAErC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'dark',\n\ttype: 'dark',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#1e1e1e',\n\t\t'button-background-color-highlight': '#3a3a3a',\n\t\t//'background': '#1e1e1e',\n\t\t'background-color': '#181818',\n\t\t'background-color-2': '#1f1f1f',\n\t\t'background-color-3': '#292929',\n\t\t'text-highlight-color': '#FFFF00',\n\t\t'text-color': '#9b9b9b',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#ffffff',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#3a3a3a',\n\t\t'border-color': '#3a3a3a',\n\t\t'border-color-2': '#2a2a2a',\n\t\t'cell-background': '#1e1e1e',\n\t\t'cell-border': '1px solid #3a3a3a',\n\t\t'hcell-background': '#2e2e2e',\n\t\t'slider-background-color': '#272727',\n\t\t'slider-background-active': '#313131',\n\t\t'slider-bar-color': '#494949',\n\t\t'slider-bar-active': '#494949',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#3F3F3F',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#000000',\n\t\t'inset-shadow-color': '#000000',\n\t\n\t\t'commands-color': '#ffffff',\n\t\t'commands-background': '#181818',\n\t\t'commands-header-background': '#363636',\n\t\t'commands-input-background': '#363636',\n\t\t'commands-shadow': '#151515',\n\t\n\t\t'dialog-color': '#ffffff',\n\t\t'dialog-background': '#181818',\n\t\t'dialog-header-background': '#363636',\n\t\t'dialog-shadow': '#151515',\n\t\t\n\t\t'tab-border-color': '#2a2a2a',\n\t\t'tab-background-color': '#181818',\n\t\t'tab-panel-background-color': '#181818',\n\t\t'tab-background-color-active': '#1f1f1f',\n\t\t\n\t\t'bucket-tab-background-color': '#2d2d2d',\n\t\t'bucket-tab-panel-background-color': '#252526',\n\t\t'bucket-tab-background-color-active': '#1f1f1f',\n\t\t'bucket-right-background-color': '#1e1e1e',\n\t\t'bucket-border-color': '#2a2a2a',\n\t\t'bucket-center-background-color': '#181818',\n\t\t'bucket-left-background-color': '#181818',\n\t\t'bucket-top-background-color': '#181818',\n\t\t'bucket-sidebar-background-color': '#272727',\n\t\t\n\t\t'form-background-color': '#323233',\n\t\n\t\t'colortype-yellow-background-color': '#655600',\n\t\t'colortype-yellow-border-color': '#9b8100',\n\t\t'colortype-yellow-text-color': '#ffffff',\n\t\n\t\t'colortype-green-background-color': '#015d00',\n\t\t'colortype-green-border-color': '#00b420',\n\t\t'colortype-green-text-color': '#ffffff',\n\t\n\t\t'colortype-red-background-color': '#730505',\n\t\t'colortype-red-border-color': '#fb1515',\n\t\t'colortype-red-text-color': '#ffffff',\n\t\n\t\t'colortype-blue-background-color': '#002265',\n\t\t'colortype-blue-border-color': '#007cdc',\n\t\t'colortype-blue-text-color': '#ffffff',\n\t\n\t\t'colortype-gray-background-color': '#434343',\n\t\t'colortype-gray-border-color': '#6e6e6e',\n\t\t'colortype-gray-text-color': '#ffffff',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#474747',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmLight.d.ts","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tmLight.d.ts","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;wBA2F/B,KAAK;AAzFV,wBAyFW"}
|
|
@@ -6,6 +6,7 @@ export default {
|
|
|
6
6
|
definition: {
|
|
7
7
|
'font-size': dom.numToPixels(constants.FONT_SIZE),
|
|
8
8
|
'font-family': 'verdana',
|
|
9
|
+
'base-radius': '3px',
|
|
9
10
|
'button-color': 'var(--og-accent-color)',
|
|
10
11
|
'button-background-color': '#ffffff',
|
|
11
12
|
'button-background-color-highlight': '#cccccc',
|
|
@@ -20,7 +21,7 @@ export default {
|
|
|
20
21
|
'text-color-reversed': '#ffffff',
|
|
21
22
|
'border': '#cccccc',
|
|
22
23
|
'border-color': '#cccccc',
|
|
23
|
-
'border-color-2': '#
|
|
24
|
+
'border-color-2': '#939393',
|
|
24
25
|
'cell-background': '#ffffff',
|
|
25
26
|
'cell-border': '1px solid #cccccc',
|
|
26
27
|
'hcell-background': '#ececec',
|
|
@@ -43,7 +44,7 @@ export default {
|
|
|
43
44
|
'dialog-background': '#ffffff',
|
|
44
45
|
'dialog-header-background': '#cdcdcd',
|
|
45
46
|
'dialog-shadow': '#7e7e7e',
|
|
46
|
-
'tab-border-color': '#
|
|
47
|
+
'tab-border-color': '#939393',
|
|
47
48
|
'tab-background-color': '#f4f4f4',
|
|
48
49
|
'tab-panel-background-color': '#f4f4f4',
|
|
49
50
|
'tab-background-color-active': '#ffffff',
|
|
@@ -51,7 +52,7 @@ export default {
|
|
|
51
52
|
'bucket-tab-panel-background-color': '#f4f4f4',
|
|
52
53
|
'bucket-tab-background-color-active': '#ffffff',
|
|
53
54
|
'bucket-right-background-color': '#ffffff',
|
|
54
|
-
'bucket-border-color': '#
|
|
55
|
+
'bucket-border-color': '#939393',
|
|
55
56
|
'bucket-center-background-color': '#d8d8d8',
|
|
56
57
|
'bucket-left-background-color': '#f3f3f3',
|
|
57
58
|
'bucket-top-background-color': '#e5e5e5',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmLight.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,YAAY,EAAE,SAAS;QACvB,kBAAkB,EAAE,SAAS;QAC7B,oBAAoB,EAAE,SAAS;QAC/B,oBAAoB,EAAE,SAAS;QAC/B,sBAAsB,EAAE,SAAS;QACjC,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;QACzB,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,SAAS;QACzB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AS;QAErC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'light',\n\ttype: 'light',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#ffffff',\n\t\t'button-background-color-highlight': '#cccccc',\n\t\t'background': '#ffffff',\n\t\t'background-color': '#ffffff',\n\t\t'background-color-2': '#eeeeee',\n\t\t'background-color-3': '#eeeeee',\n\t\t'text-highlight-color': '#9b8400',\n\t\t'text-color': '#000000',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#000000',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#cccccc',\n\t\t'border-color': '#cccccc',\n\t\t'border-color-2': '#
|
|
1
|
+
{"version":3,"file":"tmLight.js","sourceRoot":"","sources":["../../../src/themes/definitions/tmLight.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGnC,eAAe;IACd,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,UAAU,EAAE;QACX,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC;QACjD,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,wBAAwB;QACxC,yBAAyB,EAAE,SAAS;QACpC,mCAAmC,EAAE,SAAS;QAC9C,YAAY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,SAAS;QAE5C,uBAAuB,EAAE,SAAS;QAElC,mCAAmC,EAAE,SAAS;QAC9C,+BAA+B,EAAE,SAAS;QAC1C,6BAA6B,EAAE,SAAS;QAExC,kCAAkC,EAAE,SAAS;QAC7C,8BAA8B,EAAE,SAAS;QACzC,4BAA4B,EAAE,SAAS;QAEvC,gCAAgC,EAAE,SAAS;QAC3C,4BAA4B,EAAE,SAAS;QACvC,0BAA0B,EAAE,SAAS;QAErC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,iCAAiC,EAAE,SAAS;QAC5C,6BAA6B,EAAE,SAAS;QACxC,2BAA2B,EAAE,SAAS;QAEtC,6BAA6B,EAAE,SAAS;QAExC,yBAAyB,EAAE,SAAS;QACpC,qBAAqB,EAAE,SAAS;KAChC;CACQ,CAAC","sourcesContent":["import constants from '../../constants';\nimport { dom } from '../../common';\nimport { Theme } from '../../types';\n\nexport default {\n\tname: 'light',\n\ttype: 'light',\n\tdefinition: {\n\t\t'font-size': dom.numToPixels(constants.FONT_SIZE),\n\t\t'font-family': 'verdana',\n\t\t'base-radius': '3px',\n\t\t'button-color': 'var(--og-accent-color)',\n\t\t'button-background-color': '#ffffff',\n\t\t'button-background-color-highlight': '#cccccc',\n\t\t'background': '#ffffff',\n\t\t'background-color': '#ffffff',\n\t\t'background-color-2': '#eeeeee',\n\t\t'background-color-3': '#eeeeee',\n\t\t'text-highlight-color': '#9b8400',\n\t\t'text-color': '#000000',\n\t\t'text-color-2': '#ffffff',\n\t\t'text-color-3': '#000000',\n\t\t'text-color-reversed': '#ffffff',\n\t\t'border': '#cccccc',\n\t\t'border-color': '#cccccc',\n\t\t'border-color-2': '#939393',\n\t\t'cell-background': '#ffffff',\n\t\t'cell-border': '1px solid #cccccc',\n\t\t'hcell-background': '#ececec',\n\t\t'slider-background-color': '#eeeeee',\n\t\t'slider-background-active': '#e2e2e2',\n\t\t'slider-bar-color': '#aaaaaa',\n\t\t'slider-bar-active': '#aaaaaa',\n\t\t'expander-color': '#707070',\n\t\t'expander-hover': '#00955d',\n\t\t'expander-background-color': '#dbdbdb',\n\t\t'sizer-background': '#00955d',\n\t\t'frozen-border': '#b7b7b7',\n\t\t'inset-shadow-color': '#707070',\n\t\t\n\t\t'commands-color': '#000000',\n\t\t'commands-background': '#ffffff',\n\t\t'commands-header-background': '#cdcdcd',\n\t\t'commands-input-background': '#cdcdcd',\n\t\t'commands-shadow': '#7e7e7e',\n\t\n\t\t'dialog-color': '#000000',\n\t\t'dialog-background': '#ffffff',\n\t\t'dialog-header-background': '#cdcdcd',\n\t\t'dialog-shadow': '#7e7e7e',\n\t\t\n\t\t'tab-border-color': '#939393',\n\t\t'tab-background-color': '#f4f4f4',\n\t\t'tab-panel-background-color': '#f4f4f4',\n\t\t'tab-background-color-active': '#ffffff',\n\t\t\n\t\t'bucket-tab-background-color': '#f4f4f4',\n\t\t'bucket-tab-panel-background-color': '#f4f4f4',\n\t\t'bucket-tab-background-color-active': '#ffffff',\n\t\t'bucket-right-background-color': '#ffffff',\n\t\t'bucket-border-color': '#939393',\n\t\t'bucket-center-background-color': '#d8d8d8',\n\t\t'bucket-left-background-color': '#f3f3f3',\n\t\t'bucket-top-background-color': '#e5e5e5',\n\t\t'bucket-sidebar-background-color': '#f3f3f3',\n\t\t\n\t\t'form-background-color': '#e5e5e5',\n\t\n\t\t'colortype-yellow-background-color': '#e2d68d',\n\t\t'colortype-yellow-border-color': '#9b8100',\n\t\t'colortype-yellow-text-color': '#000000',\n\t\n\t\t'colortype-green-background-color': '#7ecf7e',\n\t\t'colortype-green-border-color': '#00b420',\n\t\t'colortype-green-text-color': '#000000',\n\t\n\t\t'colortype-red-background-color': '#ed8181',\n\t\t'colortype-red-border-color': '#fb1515',\n\t\t'colortype-red-text-color': '#000000',\n\t\n\t\t'colortype-blue-background-color': '#88b0ff',\n\t\t'colortype-blue-border-color': '#007cdc',\n\t\t'colortype-blue-text-color': '#000000',\n\t\n\t\t'colortype-gray-background-color': '#dadada',\n\t\t'colortype-gray-border-color': '#cbcbcb',\n\t\t'colortype-gray-text-color': '#000000',\n\t\n\t\t'colortype-accent-text-color': '#ffffff',\n\t\n\t\t'switch-background-color': '#cccccc',\n\t\t'switch-slider-color': '#ffffff',\n\t},\n} as Theme;"]}
|
package/dist/ui/alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/ui/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAKvD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAC,SAAS,GAAC,MAAM,GAAC,SAAS,CAAC;AAS5D,qBAAa,UAAW,SAAQ,KAAK;gBACxB,IAAI,EAAE,MAAM;CAGxB;AAED,qBACa,KAAM,SAAQ,UAAU;IAEpC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/ui/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAKvD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAC,SAAS,GAAC,MAAM,GAAC,SAAS,CAAC;AAS5D,qBAAa,UAAW,SAAQ,KAAK;gBACxB,IAAI,EAAE,MAAM;CAGxB;AAED,qBACa,KAAM,SAAQ,UAAU;IAEpC,MAAM,CAAC,MAAM,4BAwCX;IAGF,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,SAAS,CAAC;IAGhB,QAAQ,UAAS;IAEjB,KAAK,CAAC,aAAa,CAAC,EAAE,OAAO;IAK7B,MAAM,6CAUJ;CAEF"}
|
package/dist/ui/alert.js
CHANGED
package/dist/ui/alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/ui/al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C;2CACpC,SAAS,CAAC,OAAO,CAAC,GAAgB,CAAC,CAAC;;GAE5E,CAAC;CACF,AAxCY,CAwCX;AAGF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;mCACZ;AAGb;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;mCACZ;AAGb;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;mCACxB;AAGhB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;uCACT;AAtDL,KAAK;IADjB,aAAa,CAAC,UAAU,CAAC;GACb,KAAK,CAyEjB","sourcesContent":["import { LitElement, html, css, unsafeCSS } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ColorTypes } from '../types';\nimport { dom } from '../common';\n\nexport type AlertType = 'danger'|'warning'|'info'|'success';\n\nconst typeMap: Record<AlertType, ColorTypes> = {\n\t'danger': ColorTypes.Red,\n\t'warning': ColorTypes.Yellow,\n\t'info': ColorTypes.Blue,\n\t'success': ColorTypes.Green\n};\n\nexport class AlertEvent extends Event {\n\tconstructor(type: string) {\n\t\tsuper(`alert.${type}`, {bubbles: true, composed: true});\n\t}\n}\n\n@customElement(`og-alert`)\nexport class Alert extends LitElement {\n\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tpadding: 5px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tgap: 5px;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t}\n\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t#text {\n\t\t\tflex: 1;\n\t\t}\n\n\t\t#close {\n\t\t\tmin-width: 16px;\n\t\t\theight: 16px;\n\t\t\tline-height: 16px;\n\t\t\tflex: 0;\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t\ttext-align: center;\n\t\t}\n\n\t\t#close:hover {\n\t\t\tbackground-color: #000000;\n\t\t\topacity: 0.5;\n\t\t}\n\t\t`, ...Array.from(Object.keys(typeMap)).map(key => css`\n\t\t\t:host([type=\"${unsafeCSS(key)}\"]) {\n\t\t\t\tcolor: var(--og-colortype-${unsafeCSS(typeMap[key as AlertType])}-text-color);\n\t\t\t\tbackground-color: var(--og-colortype-${unsafeCSS(typeMap[key as AlertType])}-background-color);\n\t\t\t\tborder: 1px solid var(--og-colortype-${unsafeCSS(typeMap[key as AlertType])}-border-color);\n\t\t\t}\n\t\t`)\n\t];\n\n\t@property({type: String})\n\ttext: string;\n\n\t@property({type: String})\n\ticon: string;\n\n\t@property({type: String, reflect: true})\n\ttype: AlertType;\n\n\t@property({type: Boolean})\n\tclosable = false;\n\n\tclose(dispatchEvent?: boolean) {\n\t\tdom.remove(this);\n\t\tif (dispatchEvent) this.dispatchEvent(new AlertEvent('close'));\n\t}\n\n\trender = () => html`\n\t\t${this.icon ? html`\n\t\t\t<og-fa-icon .icon=\"${this.icon}\"></og-fa-icon>\n\t\t` : ''}\n\t\t<div id=\"text\">\n\t\t\t${this.text ? html`${this.text}` : html`<slot name=\"content\"></slot>`}\n\t\t</div>\n\t\t${this.closable ? html`\n\t\t\t<div id=\"close\" @click=\"${() => this.close(true)}\">×</div>\n\t\t` : ``}\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,yBAmEjB,CAAC"}
|
package/dist/ui/button.style.js
CHANGED
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEvB,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\tog-icon {\n\t\tflex: 0;\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+.content {\n\t\tmargin-left: 4px;\n\t\tmargin-right: 4px;\n\t}\n\t\n`;"]}
|
package/dist/ui/colorpicker.js
CHANGED
|
@@ -168,6 +168,8 @@ ColorPicker.styles = css `
|
|
|
168
168
|
|
|
169
169
|
:host {
|
|
170
170
|
display: inline-block;
|
|
171
|
+
border: 1px solid var(--og-accent-color);
|
|
172
|
+
border-radius: var(--og-base-radius);
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
.color {
|
|
@@ -181,10 +183,6 @@ ColorPicker.styles = css `
|
|
|
181
183
|
border-color: var(--og-accent-color);
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
table {
|
|
185
|
-
border: 1px solid var(--og-accent-color);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
186
|
input {
|
|
189
187
|
border-width: 0;
|
|
190
188
|
outline: none;
|
|
@@ -193,7 +191,6 @@ ColorPicker.styles = css `
|
|
|
193
191
|
width: 100%;
|
|
194
192
|
background-color: var(--og-background-color);
|
|
195
193
|
color: var(--og-text-color);
|
|
196
|
-
border: 1px solid var(--og-accent-color);
|
|
197
194
|
text-align: center;
|
|
198
195
|
font-size: var(--og-font-size);
|
|
199
196
|
font-family: var(--og-font-family);
|
|
@@ -201,11 +198,14 @@ ColorPicker.styles = css `
|
|
|
201
198
|
|
|
202
199
|
.cross {
|
|
203
200
|
flex: 0 20px;
|
|
201
|
+
border: none;
|
|
202
|
+
border-radius: 0;
|
|
204
203
|
}
|
|
205
204
|
|
|
206
205
|
.header {
|
|
207
206
|
display: flex;
|
|
208
207
|
flex-direction: row;
|
|
208
|
+
border-bottom: 1px solid var(--og-accent-color);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.header > * {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorpicker.js","sourceRoot":"","sources":["../../src/ui/colorpicker.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,U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,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;YAC/C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;YAC7B,CAAC;QACF,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC;IAChD,CAAC;IAmBD,WAAW;QACV,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1D,CAAC;IACF,CAAC;;AAhJM,kBAAM,GAAG,GAAG,CAAA;;;;;;;;YAQR,SAAS,CAAC,sBAAsB;aAC/B,SAAS,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC3C,AAhDY,CAgDX;AAGF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;2CACL;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;0CACX;AAGd;IADC,KAAK,CAAC,OAAO,CAAC;0CACS;AA3DZ,WAAW;IADvB,aAAa,CAAC,gBAAgB,CAAC;GACnB,WAAW,CAgLvB","sourcesContent":["import constants from '../constants';\nimport { html, LitElement, css } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport Color from 'color';\nimport { colors, dom, events } from '../common';\nimport { contrastColor } from '../common/colors';\n\nconst baseColors = [\n\t'#808080',\n\t'#961e1d',\n\t'#ba2f2a',\n\t'#ed1b24',\n\t'#F1631B',\n\t'#F7941D',\n\t'#FFC210',\n\t'#FEF200',\n\t'#CADB2A',\n\t'#87BE2F',\n\t'#66B032',\n\t'#2E913E',\n\t'#006F3C',\n\t'#007071',\n\t'#008DB1',\n\t'#00ADF1',\n\t'#008FD5',\n\t'#0274BB',\n\t'#0054AE',\n\t'#2F3397',\n\t'#573498',\n\t'#6B3499',\n\t'#92278F',\n\t'#B91B8A',\n\t'#EA028C',\n];\n\nconst createColors = (rows: number): string[][] => {\n\tconst colors: string[][] = [];\n\tfor (let l = 0; l <= 100; l += 100 / rows) {\n\t\tcolors.push(baseColors.map(c => Color(c).hsl().l(l).hex().toString()));\n\t}\n\treturn colors;\n};\n\nexport class ColorPickerEvent extends Event {\n\n\tconstructor(type: string, public readonly color: string) {\n\t\tsuper(`${type}`);\n\t}\n}\n\nconst COLOR_REGEX = /^#?[0-9a-f]{6}$/i;\nconst PARTIAL_COLOR_REGEX = /^#?[0-9a-f]{0,6}$/i;\n\n@customElement('og-colorpicker')\nexport class ColorPicker extends LitElement {\n\n\tstatic styles = css`\n\t\t* { box-sizing: border-box }\n\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t.color {\n\t\t\twidth: ${constants.COLORPICKER_COLOR_SIZE}px;\n\t\t\theight: ${constants.COLORPICKER_COLOR_SIZE}px;\n\t\t\tcursor: pointer;\n\t\t\tborder: 2px solid transparent;\n\t\t}\n\n\t\t.color:hover, .color.selected {\n\t\t\tborder-color: var(--og-accent-color);\n\t\t}\n\n\t\ttable {\n\t\t\tborder: 1px solid var(--og-accent-color);\n\t\t}\n\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\toutline: none;\n\t\t\theight: 100%;\n\t\t\tflex: 1;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tcolor: var(--og-text-color);\n\t\t\tborder: 1px solid var(--og-accent-color);\n\t\t\ttext-align: center;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t}\n\n\t\t.cross {\n\t\t\tflex: 0 20px;\n\t\t}\n\n\t\t.header {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t}\n\n\t\t.header > * {\n\t\t\theight: 20px;\n\t\t}\n\t`;\n\n\t@property({type: Array})\n\tcolors: string[][];\n\n\t@property({type: String})\n\tcolor: string;\n\n\t@query('input')\n\tinput: HTMLInputElement;\n\n\t_lastValue: string;\n\t_isEditing = false;\n\tget isManuallyEdited() { return this._lastValue != null }\n\n\tcommit(value: string|null, dispatchEvent = true) {\n\t\tif (value != null) {\n\t\t\tvalue = colors.css(value);\n\t\t\tif (!COLOR_REGEX.test(value)) return false;\n\t\t}\n\t\tthis.color = value;\n\t\tif (dispatchEvent) this.dispatchEvent(new events.ChangeEvent(this.color));\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tdom.on(this, 'click', '.color', (_e: MouseEvent, elm) => {\n\t\t\tif (!this.commit(elm.dataset.color)) return;\n\t\t\tthis.dispatchEvent(new ColorPickerEvent('select', this.color));\n\t\t});\n\n\t\tdom.on(this, 'mousemove', '.color', (_e: MouseEvent, elm) => {\n\t\t\tif (this.input.value != elm.dataset.color) {\n\t\t\t\tconst color = elm.dataset.color;\n\t\t\t\tthis.updateInput(color);\n\t\t\t\tthis.dispatchEvent(new ColorPickerEvent('preview', color));\n\t\t\t}\n\t\t});\n\n\t\tthis.addEventListener('mouseout', () => {\n\t\t\tif (this._isEditing) return;\n\t\t\tthis.updateInput();\n\t\t\tthis.dispatchEvent(new ColorPickerEvent('previewEnd', this.color));\n\t\t});\n\t}\n\n\twillUpdate() {\n\t\tthis.color = colors.css(this.color);\n\t\tif (!this.colors || this.colors.length == 0) {\n\t\t\tthis.colors = createColors(5);\n\t\t}\n\t}\n\n\tresetEditState() {\n\t\tthis._lastValue = null;\n\t}\n\n\tupdateInput(color?: string) {\n\t\tcolor = color ?? this.color;\n\t\tthis.input.value = color ?? '';\n\n\t\tif (color) {\n\t\t\ttry {\n\t\t\t\tthis.input.style.color = contrastColor(color);\n\t\t\t} catch (error) {\n\t\t\t\tthis.input.style.color = '';\n\t\t\t}\n\t\t} else {\n\t\t\tthis.input.style.color = '';\n\t\t}\n\n\t\tthis.input.style.backgroundColor = color ?? '';\n\t}\n\n\t_onTextInput = (_e: InputEvent) => {\n\t\tthis._isEditing = true;\n\t\tif (!PARTIAL_COLOR_REGEX.test(this.input.value)) {\n\t\t\tthis.input.value = this._lastValue;\n\t\t} else {\n\t\t\tlet value = this.input.value ?? '';\n\t\t\tvalue = value.startsWith('#') ? value : ('#' + value);\n\t\t\tthis.updateInput(value);\n\t\t\tthis._lastValue = this.input.value;\n\t\t}\n\t}\n\n\t_onTextChange = () => {\n\t\tthis._isEditing = false;\n\t\tthis.commit(this.input.value);\n\t}\n\n\tselectInput() {\n\t\tif (this.input.value.length > 0) {\n\t\t\tthis.input.setSelectionRange(1, this.input.value.length);\n\t\t}\n\t}\n\n\trender = () => html`\n\t\t<div class=\"header\">\n\t\t\t<input type=\"text\"\n\t\t\t\t@input=\"${this._onTextInput}\"\n\t\t\t\t@focus=\"${() => this.selectInput()}\"\n\t\t\t\t@change=\"${this._onTextChange}\">\n\n\t\t\t<og-button\n\t\t\t\tclass=\"cross\"\n\t\t\t\t@click=\"${() => this.commit(null)}\"\n\t\t\t\ticon=\"xmark\"\n\t\t\t\tcolor=\"red\">\n\t\t\t</og-button>\n\t\t</div>\n\n\t\t<table>\n\t\t\t${map(this.colors, row => html`<tr>\n\t\t\t\t${map(row, color => html`<td>\n\t\t\t\t\t<div \n\t\t\t\t\t\tclass=\"${classMap({color: true, selected: this.color == color})}\"\n\t\t\t\t\t\tdata-color=\"${color}\"\n\t\t\t\t\t\tstyle=\"background: ${color}\">\n\t\t\t\t\t</div>\n\t\t\t\t</td>`)}\n\t\t\t</tr>`)}\n\t\t</table>\n\t`;\n\n}"]}
|
|
1
|
+
{"version":3,"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AI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;QAE/B,IAAI,KAAK,EAAE,CAAC;YACX,IAAI,CAAC;gBACJ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;YAC/C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;YAC7B,CAAC;QACF,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC;IAChD,CAAC;IAmBD,WAAW;QACV,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1D,CAAC;IACF,CAAC;;AAhJM,kBAAM,GAAG,GAAG,CAAA;;;;;;;;;;YAUR,SAAS,CAAC,sBAAsB;aAC/B,SAAS,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC3C,AAhDY,CAgDX;AAGF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;2CACL;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;0CACX;AAGd;IADC,KAAK,CAAC,OAAO,CAAC;0CACS;AA3DZ,WAAW;IADvB,aAAa,CAAC,gBAAgB,CAAC;GACnB,WAAW,CAgLvB","sourcesContent":["import constants from '../constants';\nimport { html, LitElement, css } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport Color from 'color';\nimport { colors, dom, events } from '../common';\nimport { contrastColor } from '../common/colors';\n\nconst baseColors = [\n\t'#808080',\n\t'#961e1d',\n\t'#ba2f2a',\n\t'#ed1b24',\n\t'#F1631B',\n\t'#F7941D',\n\t'#FFC210',\n\t'#FEF200',\n\t'#CADB2A',\n\t'#87BE2F',\n\t'#66B032',\n\t'#2E913E',\n\t'#006F3C',\n\t'#007071',\n\t'#008DB1',\n\t'#00ADF1',\n\t'#008FD5',\n\t'#0274BB',\n\t'#0054AE',\n\t'#2F3397',\n\t'#573498',\n\t'#6B3499',\n\t'#92278F',\n\t'#B91B8A',\n\t'#EA028C',\n];\n\nconst createColors = (rows: number): string[][] => {\n\tconst colors: string[][] = [];\n\tfor (let l = 0; l <= 100; l += 100 / rows) {\n\t\tcolors.push(baseColors.map(c => Color(c).hsl().l(l).hex().toString()));\n\t}\n\treturn colors;\n};\n\nexport class ColorPickerEvent extends Event {\n\n\tconstructor(type: string, public readonly color: string) {\n\t\tsuper(`${type}`);\n\t}\n}\n\nconst COLOR_REGEX = /^#?[0-9a-f]{6}$/i;\nconst PARTIAL_COLOR_REGEX = /^#?[0-9a-f]{0,6}$/i;\n\n@customElement('og-colorpicker')\nexport class ColorPicker extends LitElement {\n\n\tstatic styles = css`\n\t\t* { box-sizing: border-box }\n\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tborder: 1px solid var(--og-accent-color);\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t}\n\n\t\t.color {\n\t\t\twidth: ${constants.COLORPICKER_COLOR_SIZE}px;\n\t\t\theight: ${constants.COLORPICKER_COLOR_SIZE}px;\n\t\t\tcursor: pointer;\n\t\t\tborder: 2px solid transparent;\n\t\t}\n\n\t\t.color:hover, .color.selected {\n\t\t\tborder-color: var(--og-accent-color);\n\t\t}\n\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\toutline: none;\n\t\t\theight: 100%;\n\t\t\tflex: 1;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tcolor: var(--og-text-color);\n\t\t\ttext-align: center;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t}\n\n\t\t.cross {\n\t\t\tflex: 0 20px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t.header {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tborder-bottom: 1px solid var(--og-accent-color);\n\t\t}\n\n\t\t.header > * {\n\t\t\theight: 20px;\n\t\t}\n\t`;\n\n\t@property({type: Array})\n\tcolors: string[][];\n\n\t@property({type: String})\n\tcolor: string;\n\n\t@query('input')\n\tinput: HTMLInputElement;\n\n\t_lastValue: string;\n\t_isEditing = false;\n\tget isManuallyEdited() { return this._lastValue != null }\n\n\tcommit(value: string|null, dispatchEvent = true) {\n\t\tif (value != null) {\n\t\t\tvalue = colors.css(value);\n\t\t\tif (!COLOR_REGEX.test(value)) return false;\n\t\t}\n\t\tthis.color = value;\n\t\tif (dispatchEvent) this.dispatchEvent(new events.ChangeEvent(this.color));\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tdom.on(this, 'click', '.color', (_e: MouseEvent, elm) => {\n\t\t\tif (!this.commit(elm.dataset.color)) return;\n\t\t\tthis.dispatchEvent(new ColorPickerEvent('select', this.color));\n\t\t});\n\n\t\tdom.on(this, 'mousemove', '.color', (_e: MouseEvent, elm) => {\n\t\t\tif (this.input.value != elm.dataset.color) {\n\t\t\t\tconst color = elm.dataset.color;\n\t\t\t\tthis.updateInput(color);\n\t\t\t\tthis.dispatchEvent(new ColorPickerEvent('preview', color));\n\t\t\t}\n\t\t});\n\n\t\tthis.addEventListener('mouseout', () => {\n\t\t\tif (this._isEditing) return;\n\t\t\tthis.updateInput();\n\t\t\tthis.dispatchEvent(new ColorPickerEvent('previewEnd', this.color));\n\t\t});\n\t}\n\n\twillUpdate() {\n\t\tthis.color = colors.css(this.color);\n\t\tif (!this.colors || this.colors.length == 0) {\n\t\t\tthis.colors = createColors(5);\n\t\t}\n\t}\n\n\tresetEditState() {\n\t\tthis._lastValue = null;\n\t}\n\n\tupdateInput(color?: string) {\n\t\tcolor = color ?? this.color;\n\t\tthis.input.value = color ?? '';\n\n\t\tif (color) {\n\t\t\ttry {\n\t\t\t\tthis.input.style.color = contrastColor(color);\n\t\t\t} catch (error) {\n\t\t\t\tthis.input.style.color = '';\n\t\t\t}\n\t\t} else {\n\t\t\tthis.input.style.color = '';\n\t\t}\n\n\t\tthis.input.style.backgroundColor = color ?? '';\n\t}\n\n\t_onTextInput = (_e: InputEvent) => {\n\t\tthis._isEditing = true;\n\t\tif (!PARTIAL_COLOR_REGEX.test(this.input.value)) {\n\t\t\tthis.input.value = this._lastValue;\n\t\t} else {\n\t\t\tlet value = this.input.value ?? '';\n\t\t\tvalue = value.startsWith('#') ? value : ('#' + value);\n\t\t\tthis.updateInput(value);\n\t\t\tthis._lastValue = this.input.value;\n\t\t}\n\t}\n\n\t_onTextChange = () => {\n\t\tthis._isEditing = false;\n\t\tthis.commit(this.input.value);\n\t}\n\n\tselectInput() {\n\t\tif (this.input.value.length > 0) {\n\t\t\tthis.input.setSelectionRange(1, this.input.value.length);\n\t\t}\n\t}\n\n\trender = () => html`\n\t\t<div class=\"header\">\n\t\t\t<input type=\"text\"\n\t\t\t\t@input=\"${this._onTextInput}\"\n\t\t\t\t@focus=\"${() => this.selectInput()}\"\n\t\t\t\t@change=\"${this._onTextChange}\">\n\n\t\t\t<og-button\n\t\t\t\tclass=\"cross\"\n\t\t\t\t@click=\"${() => this.commit(null)}\"\n\t\t\t\ticon=\"xmark\"\n\t\t\t\tcolor=\"red\">\n\t\t\t</og-button>\n\t\t</div>\n\n\t\t<table>\n\t\t\t${map(this.colors, row => html`<tr>\n\t\t\t\t${map(row, color => html`<td>\n\t\t\t\t\t<div \n\t\t\t\t\t\tclass=\"${classMap({color: true, selected: this.color == color})}\"\n\t\t\t\t\t\tdata-color=\"${color}\"\n\t\t\t\t\t\tstyle=\"background: ${color}\">\n\t\t\t\t\t</div>\n\t\t\t\t</td>`)}\n\t\t\t</tr>`)}\n\t\t</table>\n\t`;\n\n}"]}
|
|
@@ -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;
|
|
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;gBAE3B,KAAK,EAAE,MAAM;CAGzB;AAED,qBACa,iBAAkB,SAAQ,UAAU;IAEhD,MAAM,CAAC,MAAM,0BAcX;;IAOF,MAAM,0BAA6D;CACnE;AAED,qBAEa,QAAS,SAAQ,UAAW,YAAW,MAAM;IAEzD,MAAM,CAAC,MAAM,4BA+BV;IAGH,SAAS,EAAE,MAAM,GAAC,OAAO,CAAW;IAGpC,cAAc,SAAK;IAGnB,cAAc,EAAE,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,MAAO,UAAU,UAKpC;IAEK,IAAI;IAyBV,KAAK;IAKL,MAAM;IAKN,YAAY,sBAA6B;IAEzC,oBAAoB;IAKpB,cAAc,0BAIZ;IAEF,WAAW,2HAMT;IAEF,IAAI,YAAY,YAEf;IAED,MAAM,0BAeJ;IAEF,MAAM;CAYN"}
|
package/dist/ui/dropdown.js
CHANGED
|
@@ -12,6 +12,7 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
|
12
12
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
13
13
|
import { guard } from 'lit/directives/guard.js';
|
|
14
14
|
import { utils } from '../common';
|
|
15
|
+
import { colorable } from '../themes';
|
|
15
16
|
export class DropdownEvent extends Event {
|
|
16
17
|
constructor(event) {
|
|
17
18
|
super(`dropdown.${event}`);
|
|
@@ -36,6 +37,7 @@ DropdownContainer.styles = css `
|
|
|
36
37
|
font-size: var(--og-font-size);
|
|
37
38
|
font-family: var(--og-font-family);
|
|
38
39
|
line-height: 1;
|
|
40
|
+
border-radius: var(--og-base-radius);
|
|
39
41
|
}
|
|
40
42
|
`;
|
|
41
43
|
DropdownContainer = __decorate([
|
|
@@ -162,6 +164,7 @@ Dropdown.styles = [css `
|
|
|
162
164
|
cursor: pointer;
|
|
163
165
|
user-select: none;
|
|
164
166
|
outline: none;
|
|
167
|
+
border-radius: var(--og-base-radius);
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
div.text {
|
|
@@ -175,6 +178,8 @@ Dropdown.styles = [css `
|
|
|
175
178
|
|
|
176
179
|
og-button {
|
|
177
180
|
flex: 1;
|
|
181
|
+
border-radius: 0;
|
|
182
|
+
border: none;
|
|
178
183
|
}
|
|
179
184
|
`];
|
|
180
185
|
__decorate([
|
|
@@ -196,7 +201,7 @@ __decorate([
|
|
|
196
201
|
property({ type: Number })
|
|
197
202
|
], Dropdown.prototype, "width", void 0);
|
|
198
203
|
__decorate([
|
|
199
|
-
property({ type: String })
|
|
204
|
+
property({ type: String, reflect: true })
|
|
200
205
|
], Dropdown.prototype, "color", void 0);
|
|
201
206
|
__decorate([
|
|
202
207
|
property({ type: Boolean })
|
|
@@ -205,7 +210,8 @@ __decorate([
|
|
|
205
210
|
query('#label')
|
|
206
211
|
], Dropdown.prototype, "labelElm", void 0);
|
|
207
212
|
Dropdown = __decorate([
|
|
208
|
-
customElement('og-dropdown')
|
|
213
|
+
customElement('og-dropdown'),
|
|
214
|
+
colorable({ props: ['border'] })
|
|
209
215
|
], Dropdown);
|
|
210
216
|
export { Dropdown };
|
|
211
217
|
//# sourceMappingURL=dropdown.js.map
|
package/dist/ui/dropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAU,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,MAAM,OAAO,aAAc,SAAQ,KAAK;IAEvC,YAAY,KAAa;QACxB,KAAK,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC;IAC5B,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,GAAG,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnB,CAAC,AA5BW,CA4BV;AAGH;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACW;AAGpC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDACN;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDACmB;AAG5C;IADC,QAAQ,EAAE;uCAC8B;AAGzC;IADC,QAAQ,EAAE;sCACW;AAGtB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACX;AAGd;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACC;AAG1B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;yCACV;AAGhB;IADC,KAAK,CAAC,QAAQ,CAAC;0CACS;AAzDb,QAAQ;IADpB,aAAa,CAAC,aAAa,CAAC;GAChB,QAAQ,CAuKpB","sourcesContent":["import { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ColorTypes, Layout } from '../types';\nimport * as dom from '../common/dom';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { createRef, ref } from 'lit-html/directives/ref.js';\nimport { guard } from 'lit/directives/guard.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\n\nexport class DropdownEvent extends Event {\n\n\tconstructor(event: string) {\n\t\tsuper(`dropdown.${event}`);\n\t}\n}\n\n@customElement('og-dropdown-container')\nexport class DropdownContainer extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tborder: 1px solid var(--og-accent-color);\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tposition: absolute;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--og-text-color);\n\t\t\tz-index: 60000;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tline-height: 1;\n\t\t}\n\t`;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('mousedown', (e: MouseEvent) => e.stopPropagation());\n\t}\n\n\trender = () => html`<div><slot name=\"inner-content\"></slot></div>`;\n}\n\n@customElement('og-dropdown')\nexport class Dropdown extends LitElement implements Layout {\n\n\tstatic styles = [css`\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t:host {\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tflex-direction: row;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\toutline: none;\n\t\t}\n\n\t\tdiv.text {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--og-text-color-2);\n\t\t\tpadding-left: 2px;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 1;\n\t\t}\n\t`];\n\n\t@property({type: String})\n\talignment: 'left'|'right' = 'right';\n\n\t@property({type: Number})\n\tpositionOffset = 0;\n\n\t@property({type: Object})\n\tdropdownParent: HTMLElement = document.body;\n\n\t@property()\n\tlabel: string|HTMLElement|TemplateResult;\n\n\t@property()\n\ticon: IconSpec|string;\n\n\t@property({type: Number})\n\twidth: number;\n\n\t@property({type: String})\n\tcolor = ColorTypes.Accent;\n\n\t@property({type: Boolean})\n\tnoCaret = false;\n\n\t@query('#label')\n\tlabelElm: HTMLDivElement;\n\n\tprivate _contentElm: HTMLElement;\n\n\tprotected dropdownRef = createRef<DropdownContainer>();\n\tget dropdown() { return this.dropdownRef?.value }\n\n\tget isOpen() { return this.dropdown && !dom.isHidden(this.dropdown) }\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 0;\n\t}\n\n\t_onDocumentMouseDown = (e: MouseEvent) => {\n\t\tfor (const elm of e.composedPath()) {\n\t\t\tif (elm == this.dropdown || elm == this) return;\n\t\t}\n\t\tthis.close();\n\t}\n\n\tasync open() {\n\t\tthis.dispatchEvent(new DropdownEvent('beforeOpen'));\n\t\tawait this.updateComplete;\n\t\t\n\t\tif (this.dropdown.parentElement !== this.dropdownParent) {\n\t\t\tthis.dropdownParent.appendChild(this.dropdown);\n\t\t}\n\n\t\tif (this.children.length > 0 && !this._contentElm) {\n\t\t\tthis._contentElm = [...this.children].find(elm => elm.slot == 'content') as HTMLElement;\n\t\t\tif (this._contentElm) {\n\t\t\t\tthis._contentElm.slot = 'inner-content';\n\t\t\t\tthis.dropdown.appendChild(this._contentElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.width > 0) dom.setSize(this.dropdown, {w: this.width});\n\t\tdom.showElement(this.dropdown);\n\t\tthis.requestUpdate();\n\t\tawait this.dropdown.updateComplete;\n\t\tthis.dispatchEvent(new DropdownEvent('open'));\n\t\tthis.layout();\n\t\tdocument.body.addEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\tclose() {\n\t\tif (this.dropdown) dom.hideElement(this.dropdown);\n\t\tdocument.body.removeEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\ttoggle() {\n\t\tif (this.isOpen) this.close();\n\t\telse this.open();\n\t}\n\n\t_onMousedown = async () => this.toggle();\n\n\tdisconnectedCallback() {\n\t\tthis.dropdown?.remove();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\trenderDropdown = () => html`\n\t\t<og-dropdown-container ${ref(this.dropdownRef)}\n\t\t\tstyle=\"display: none\">\n\t\t</og-dropdown-container>\n\t`;\n\n\trenderLabel = () => {\n\t\tif (utils.isString(this.label)) {\n\t\t\treturn this.label === '' ? unsafeHTML(' ') : html`<div class=\"text\">${this.label}</div>`;\n\t\t} else {\n\t\t\treturn this.label;\n\t\t}\n\t};\n\n\tget hasLabelSlot() {\n\t\treturn this.querySelector('[slot=\"label\"]') != null;\n\t}\n\n\trender = () => html`\n\t\t<og-button\n\t\t\t@mousedown=\"${this._onMousedown}\"\n\t\t\tid=\"main\"\n\t\t\tcolor=\"${this.color}\"\n\t\t\t.icon=\"${this.icon}\"\n\t\t\t?caret=\"${!this.noCaret}\">\n\t\t\t${this.hasLabelSlot ? html`\n\t\t\t\t<div id=\"label\" slot=\"content\"><slot name=\"label\"></slot></div>\n\t\t\t` : guard([this.label], () => (this.noCaret && (this.label === '' || this.label == null) ? null : html`\n\t\t\t\t<div id=\"label\" slot=\"content\">${this.renderLabel()}</div>\n\t\t\t`))}\n\t\t</og-button>\n\n\t\t${this.renderDropdown()}\n\t`;\n\n\tlayout() {\n\t\tif (!this.dropdown) return;\n\t\tconst offset = dom.getElementOffset(this, this.dropdownParent);\n\t\tdom.setSize(this.dropdown, {w: this.offsetWidth}, true);\n\t\tdom.setPosition(this.dropdown, {\n\t\t\tt: offset.top + this.offsetHeight, \n\t\t\tl: this.positionOffset + (this.alignment == 'left' \n\t\t\t\t? offset.left : (offset.left + this.offsetWidth - this.dropdown.offsetWidth - 1))\n\t\t});\n\t\tdom.fixElementPosition(this.dropdown);\n\t}\n\n}"]}
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAU,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CA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,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;SAClF,CAAC,CAAC;QACH,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;;AAtKM,eAAM,GAAG,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BnB,CAAC,AA/BW,CA+BV;AAGH;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACW;AAGpC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDACN;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDACmB;AAG5C;IADC,QAAQ,EAAE;uCAC8B;AAGzC;IADC,QAAQ,EAAE;sCACW;AAGtB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCACX;AAGd;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;uCACd;AAG1B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;yCACV;AAGhB;IADC,KAAK,CAAC,QAAQ,CAAC;0CACS;AA5Db,QAAQ;IAFpB,aAAa,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAC,CAAC;GAClB,QAAQ,CA0KpB","sourcesContent":["import { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ColorTypes, Layout } from '../types';\nimport * as dom from '../common/dom';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { createRef, ref } from 'lit-html/directives/ref.js';\nimport { guard } from 'lit/directives/guard.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\nimport { colorable } from '../themes';\n\nexport class DropdownEvent extends Event {\n\n\tconstructor(event: string) {\n\t\tsuper(`dropdown.${event}`);\n\t}\n}\n\n@customElement('og-dropdown-container')\nexport class DropdownContainer extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tborder: 1px solid var(--og-accent-color);\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tposition: absolute;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--og-text-color);\n\t\t\tz-index: 60000;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tline-height: 1;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t}\n\t`;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('mousedown', (e: MouseEvent) => e.stopPropagation());\n\t}\n\n\trender = () => html`<div><slot name=\"inner-content\"></slot></div>`;\n}\n\n@customElement('og-dropdown')\n@colorable({props: ['border']})\nexport class Dropdown extends LitElement implements Layout {\n\n\tstatic styles = [css`\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t:host {\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tflex-direction: row;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\toutline: none;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t}\n\n\t\tdiv.text {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--og-text-color-2);\n\t\t\tpadding-left: 2px;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 1;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t}\n\t`];\n\n\t@property({type: String})\n\talignment: 'left'|'right' = 'right';\n\n\t@property({type: Number})\n\tpositionOffset = 0;\n\n\t@property({type: Object})\n\tdropdownParent: HTMLElement = document.body;\n\n\t@property()\n\tlabel: string|HTMLElement|TemplateResult;\n\n\t@property()\n\ticon: IconSpec|string;\n\n\t@property({type: Number})\n\twidth: number;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\t@property({type: Boolean})\n\tnoCaret = false;\n\n\t@query('#label')\n\tlabelElm: HTMLDivElement;\n\n\tprivate _contentElm: HTMLElement;\n\n\tprotected dropdownRef = createRef<DropdownContainer>();\n\tget dropdown() { return this.dropdownRef?.value }\n\n\tget isOpen() { return this.dropdown && !dom.isHidden(this.dropdown) }\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 0;\n\t}\n\n\t_onDocumentMouseDown = (e: MouseEvent) => {\n\t\tfor (const elm of e.composedPath()) {\n\t\t\tif (elm == this.dropdown || elm == this) return;\n\t\t}\n\t\tthis.close();\n\t}\n\n\tasync open() {\n\t\tthis.dispatchEvent(new DropdownEvent('beforeOpen'));\n\t\tawait this.updateComplete;\n\t\t\n\t\tif (this.dropdown.parentElement !== this.dropdownParent) {\n\t\t\tthis.dropdownParent.appendChild(this.dropdown);\n\t\t}\n\n\t\tif (this.children.length > 0 && !this._contentElm) {\n\t\t\tthis._contentElm = [...this.children].find(elm => elm.slot == 'content') as HTMLElement;\n\t\t\tif (this._contentElm) {\n\t\t\t\tthis._contentElm.slot = 'inner-content';\n\t\t\t\tthis.dropdown.appendChild(this._contentElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.width > 0) dom.setSize(this.dropdown, {w: this.width});\n\t\tdom.showElement(this.dropdown);\n\t\tthis.requestUpdate();\n\t\tawait this.dropdown.updateComplete;\n\t\tthis.dispatchEvent(new DropdownEvent('open'));\n\t\tthis.layout();\n\t\tdocument.body.addEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\tclose() {\n\t\tif (this.dropdown) dom.hideElement(this.dropdown);\n\t\tdocument.body.removeEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\ttoggle() {\n\t\tif (this.isOpen) this.close();\n\t\telse this.open();\n\t}\n\n\t_onMousedown = async () => this.toggle();\n\n\tdisconnectedCallback() {\n\t\tthis.dropdown?.remove();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\trenderDropdown = () => html`\n\t\t<og-dropdown-container ${ref(this.dropdownRef)}\n\t\t\tstyle=\"display: none\">\n\t\t</og-dropdown-container>\n\t`;\n\n\trenderLabel = () => {\n\t\tif (utils.isString(this.label)) {\n\t\t\treturn this.label === '' ? unsafeHTML(' ') : html`<div class=\"text\">${this.label}</div>`;\n\t\t} else {\n\t\t\treturn this.label;\n\t\t}\n\t};\n\n\tget hasLabelSlot() {\n\t\treturn this.querySelector('[slot=\"label\"]') != null;\n\t}\n\n\trender = () => html`\n\t\t<og-button\n\t\t\t@mousedown=\"${this._onMousedown}\"\n\t\t\tid=\"main\"\n\t\t\tcolor=\"${this.color}\"\n\t\t\t.icon=\"${this.icon}\"\n\t\t\t?caret=\"${!this.noCaret}\">\n\t\t\t${this.hasLabelSlot ? html`\n\t\t\t\t<div id=\"label\" slot=\"content\"><slot name=\"label\"></slot></div>\n\t\t\t` : guard([this.label], () => (this.noCaret && (this.label === '' || this.label == null) ? null : html`\n\t\t\t\t<div id=\"label\" slot=\"content\">${this.renderLabel()}</div>\n\t\t\t`))}\n\t\t</og-button>\n\n\t\t${this.renderDropdown()}\n\t`;\n\n\tlayout() {\n\t\tif (!this.dropdown) return;\n\t\tconst offset = dom.getElementOffset(this, this.dropdownParent);\n\t\tdom.setSize(this.dropdown, {w: this.offsetWidth}, true);\n\t\tdom.setPosition(this.dropdown, {\n\t\t\tt: offset.top + this.offsetHeight, \n\t\t\tl: this.positionOffset + (this.alignment == 'left' \n\t\t\t\t? offset.left : (offset.left + this.offsetWidth - this.dropdown.offsetWidth - 1))\n\t\t});\n\t\tdom.fixElementPosition(this.dropdown);\n\t}\n\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileInput.style.d.ts","sourceRoot":"","sources":["../../src/ui/fileInput.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"fileInput.style.d.ts","sourceRoot":"","sources":["../../src/ui/fileInput.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAsEjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileInput.style.js","sourceRoot":"","sources":["../../src/ui/fileInput.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"fileInput.style.js","sourceRoot":"","sources":["../../src/ui/fileInput.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEvB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbackground-color: var(--og-colortype-gray-background-color);\n\t\tborder: 1px solid var(--og-colortype-gray-border-color);\n\t\theight: 20px;\n\t\tline-height: 20px;\n\t\twidth: 100px;\n\t\tcursor: pointer;\n\t\tfont-size: var(--og-font-size);\n\t\tposition: relative;\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\n\t:host([disabled]) {\n\t\tcursor: not-allowed;\n\t}\n\t\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.inner {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\theight: 100%;\n\t}\n\t\n\tinput {\n\t\tdisplay: none;\n\t}\n\n\tog-icon {\n\t\tflex: 0 20px;\n\t\ttext-align: center;\n\t}\n\n\t.drop {\n\t\tposition: absolute;\n\t\tline-height: 20px;\n\t\tinset: -1px;\n\t\tborder: 2px dotted var(--og-accent-color);\n\t\tpadding: 0 5px;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n\n\t.drop.dropping {\n\t\tbackground-color: var(--og-accent-color);\n\t\tborder-color: var(--og-text-color-2);\n\t\tcolor: var(--og-text-color-2);\n\t}\n\n\t.name {\n\t\tflex: 1;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tpadding-right: 5px;\n\t\tcolor: var(--og-text-color-3);\n\t}\n\n\t#cross {\n\t\tflex: 0;\n\t\tmax-width: 14px;\n\t\tmin-width: 14px;\n\t\tborder: none;\n\t}\n\t\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.style.d.ts","sourceRoot":"","sources":["../../src/ui/input.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"input.style.d.ts","sourceRoot":"","sources":["../../src/ui/input.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,yBAgCjB,CAAC"}
|
package/dist/ui/input.style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.style.js","sourceRoot":"","sources":["../../src/ui/input.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"input.style.js","sourceRoot":"","sources":["../../src/ui/input.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`\n\t:host {\n\t\tbackground-color: var(--og-colortype-gray-background-color);\n\t\tborder: 1px solid var(--og-colortype-gray-border-color);\n\t\theight: 20px;\n\t\tline-height: 20px;\n\t\tdisplay: inline-block;\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\t\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\t\n\tinput {\n\t\tdisplay: block;\n\t\tcolor: var(--og-text-color-3);\n\t\tfont-size: var(--og-font-size);\n\t\tfont-family: var(--og-font-family);\n\t\tborder: none;\n\t\tbackground-color: inherit;\n\t\toutline: none;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\ttext-align: inherit;\n\t\tpadding: 0 4px;\n\t}\n\n\tinput[disabled] {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.style.d.ts","sourceRoot":"","sources":["../../src/ui/menu.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,yBAiCrB,CAAC;AAEF,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"menu.style.d.ts","sourceRoot":"","sources":["../../src/ui/menu.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,yBAiCrB,CAAC;AAEF,eAAO,MAAM,KAAK,yBASjB,CAAC"}
|
package/dist/ui/menu.style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.style.js","sourceRoot":"","sources":["../../src/ui/menu.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;eA0Bb,SAAS,CAAC,gBAAgB;;;;;;;CAOxC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"menu.style.js","sourceRoot":"","sources":["../../src/ui/menu.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;eA0Bb,SAAS,CAAC,gBAAgB;;;;;;;CAOxC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;CASvB,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport const itemStyle = css`\n\t.item {\n\t\tfont-size: var(--og-font-size);\n\t\tfont-family: var(--og-font-family);\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t.item.label, .item.label:hover {\n\t\tbackground-color: transparent !important;\n\t\tcursor: default !important;\n\t\tfont-weight: bold;\n\t\tcolor: var(--og-accent-color) !important;\n\t}\n\n\t.item .text {\n\t\tpadding-left: 5px;\n\t\tpadding-right: 5px;\n\t\twhite-space: nowrap;\n\t}\n\n\t.item .icon+.text {\n\t\tpadding-left: 0px;\n\t}\n\n\t.item .icon {\n\t\tmin-width: ${constants.MENU_ITEM_HEIGHT}px;\n\t\ttext-align: center;\n\t}\n\n\t.item.divider {\n\t\tborder-bottom: 1px solid var(--og-accent-color);\n\t}\n`;\n\nexport const style = css`\n\t:host {\n\t\tfont-size: var(--og-font-size);\n\t\tdisplay: block;\n\t\tborder: 1px solid var(--og-accent-color);\n\t\tbackground: var(--og-background-color);\n\t\tcolor: var(--og-text-color);\n\t\tborder-radius: var(--og-base-radius);\n\t}\n`;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.style.d.ts","sourceRoot":"","sources":["../../src/ui/slider.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"slider.style.d.ts","sourceRoot":"","sources":["../../src/ui/slider.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,yBAqDjB,CAAC"}
|
package/dist/ui/slider.style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.style.js","sourceRoot":"","sources":["../../src/ui/slider.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;WAqBb,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;YAgB/B,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"slider.style.js","sourceRoot":"","sources":["../../src/ui/slider.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;WAqBb,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;YAgB/B,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;CAgB3C,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport constants from '../constants';\n\nexport const style = css`\n\t:host {\n\t\tdisplay: block;\n\t\tbackground-color: var(--og-slider-background-color);\n\t\tposition: relative;\n\t\topacity: 0.8;\n\t\ttransition: visibility 0s, opacity 0.1s linear;\n\t\tfont-size: var(--og-font-size);\n\t}\n\n\t:host([hidden]) {\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\ttransition: opacity 1s linear, visibility 0s 1s;\n\t}\n\n\t:host([direction=\"vertical\"]) {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\twidth: ${unsafeCSS(constants.SLIDER_SIZE)}px\n\t}\n\n\t:host([direction=\"vertical\"]) .bar {\n\t\twidth: 100%;\n\t}\n\n\t:host([direction=\"horizontal\"]) .bar {\n\t\theight: 100%;\n\t}\n\n\t:host([direction=\"horizontal\"]) {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: ${unsafeCSS(constants.SLIDER_SIZE)}px\n\t}\n\n\t.bar {\n\t\tposition: absolute;\n\t}\n\n\t.bar-inner {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-width: 3px;\n\t\tbackground-color: var(--og-slider-bar-color);\n\t\tborder-color: var(--og-slider-background-color);\n\t\ttext-align: center;\n\t\tborder-radius: var(--og-base-radius);\n\t}\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.style.d.ts","sourceRoot":"","sources":["../../src/ui/switch.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"switch.style.d.ts","sourceRoot":"","sources":["../../src/ui/switch.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,2BA6IhB,CAAC"}
|
package/dist/ui/switch.style.js
CHANGED
|
@@ -67,6 +67,14 @@ export const style = [...Object.values(ColorTypes).map(type => css `
|
|
|
67
67
|
background-color: var(--og-switch-slider-color);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
:host([shape="square"]) label {
|
|
71
|
+
border-radius: var(--og-base-radius);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([shape="square"]) .slider {
|
|
75
|
+
border-radius: calc(var(--og-base-radius) - 1px);
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
|
|
71
79
|
.background {
|
|
72
80
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.style.js","sourceRoot":"","sources":["../../src/ui/switch.style.ts"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HN,CAAC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { ColorTypes } from '../types';\n\nexport const style = [...Object.values(ColorTypes).map(type => css`\n\t:host([color=\"${unsafeCSS(type)}\"][state=\"on\"]) .background > div:nth-child(2) {\n\t\tbackground-color: var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"][state=\"on\"]) .background > div:nth-child(1) {\n\t\tborder-bottom-color: var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"][state=\"on\"]) .background > div:nth-child(3) {\n\t\tborder-top-color: var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"][shape=\"square\"][state=\"on\"]) label,\n\t:host([color=\"${unsafeCSS(type)}\"][shape=\"round\"][state=\"on\"]) label {\n\t\tbackground-color: var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n`), css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t\twidth: var(--og-switch-width, 36px);\n\t\theight: var(--og-switch-height, 20px);\n\t}\n\n\t:host {\n\t\t--og-slider-size: calc(var(--og-switch-height) - var(--og-switch-margin));\n\t\t--og-slider-sqrt3: calc(var(--og-slider-size) * sqrt(3));\n\t}\n\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\tlabel {\n\t\tcursor: pointer;\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: var(--og-switch-width);\n\t\theight: var(--og-switch-height);\n\t}\n\t \n\tinput {\n\t\topacity: 0;\n\t\twidth: 0;\n\t\theight: 0;\n\t\tposition: absolute;\n\t}\n\n\t:host([shape=\"square\"]) label, :host([shape=\"round\"]) label {\n\t\tbackground-color: var(--og-switch-background-color);\n\t}\n\n\t:host([shape=\"round\"]) label {\n\t\tborder-radius: calc(var(--og-switch-width) / 2);\n\t}\n\n\t:host([shape=\"round\"]) .slider {\n\t\tborder-radius: calc(var(--og-slider-size) / 2);\n\t}\n\n\t:host([shape=\"square\"]) .slider, :host([shape=\"round\"]) .slider {\n\t\twidth: var(--og-slider-size);\n\t\theight: var(--og-slider-size);\n\t\tbackground-color: var(--og-switch-slider-color);\n\t}\n\n\t:host([shape=\"square\"]) label {\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\n\t:host([shape=\"square\"]) .slider {\n\t\tborder-radius: calc(var(--og-base-radius) - 1px);\n\t}\n\n\n\t.background {\n\t\twidth: 100%;\n\t}\n\n\t.background > div:nth-child(1) {\n\t\tborder-bottom: calc(var(--og-switch-height) / 4) solid var(--og-switch-background-color);\n\t\tborder-left: calc(var(--og-switch-height) * sqrt(3) / 4) solid transparent;\n\t\tborder-right: calc(var(--og-switch-height) * sqrt(3) / 4) solid transparent;\n\t\theight: 0;\n\t\twidth: var(--og-switch-width);\n\t}\n\n\t.background > div:nth-child(2) {\n\t\theight: calc(var(--og-switch-height) / 2);\n\t\twidth: var(--og-switch-width);\n\t\tbackground-color: var(--og-switch-background-color);\n\t}\n\n\t.background > div:nth-child(3) {\n\t\tborder-top: calc(var(--og-switch-height) / 4) solid var(--og-switch-background-color);\n\t\tborder-left: calc(var(--og-switch-height) * sqrt(3) / 4) solid transparent;\n\t\tborder-right: calc(var(--og-switch-height) * sqrt(3) / 4) solid transparent;\n\t\theight: 0;\n\t\twidth: var(--og-switch-width);\n\t}\n\n\t.slider {\n\t\tposition: absolute;\n\t\ttop: calc((var(--og-switch-height) - var(--og-slider-size)) / 2);\n\t\tleft: calc((var(--og-switch-height) - var(--og-slider-size)) / 2);\n\t\twidth: calc(var(--og-slider-size) * sqrt(3) / 2);\n\t\ttransition: .4s;\n\t}\n\n\t.slider > div {\n\t\tposition: absolute;\n\t}\n\n\t.slider > div:nth-child(1) {\n\t\tborder-right: calc(0.5px + var(--og-slider-sqrt3) / 4) solid var(--og-switch-slider-color);\n\t\tborder-top: calc(var(--og-slider-size) / 4) solid transparent;\n\t\tborder-bottom: calc(var(--og-slider-size) / 4) solid transparent;\n\t\twidth: 0;\n\t\theight: var(--og-slider-size);\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n\n\t.slider > div:nth-child(2) {\n\t\tborder-left: calc(0.5px + var(--og-slider-sqrt3) / 4) solid var(--og-switch-slider-color);\n\t\tborder-top: calc(var(--og-slider-size) / 4) solid transparent;\n\t\tborder-bottom: calc(var(--og-slider-size) / 4) solid transparent;\n\t\twidth: 0;\n\t\theight: var(--og-slider-size);\n\t\ttop: 0;\n\t\tright: 0;\n\t}\n\n\t:host([shape=\"hexagon\"]) input:checked + .slider {\n\t\ttransform: translateX(calc(var(--og-switch-width) - (var(--og-slider-sqrt3) / 2) - ((var(--og-switch-height) - var(--og-slider-size)))));\n\t}\n\n\t:host([shape=\"round\"]) input:checked + .slider, :host([shape=\"square\"]) input:checked + .slider {\n\t\ttransform: translateX(calc(var(--og-switch-width) - var(--og-slider-size) - var(--og-switch-height) + var(--og-slider-size)));\n\t}\n`];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.style.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.style.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tooltip.style.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.style.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,2BA2GhB,CAAC"}
|
package/dist/ui/tooltip.style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.style.js","sourceRoot":"","sources":["../../src/ui/tooltip.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,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,IAAI,CAAC;;;iBAGxE,SAAS,CAAC,IAAI,CAAC;gBAChB,SAAS,CAAC,cAAc,+BAA+B,SAAS,CAAC,IAAI,CAAC;;;iBAGrE,SAAS,CAAC,IAAI,CAAC;kBACd,SAAS,CAAC,cAAc,+BAA+B,SAAS,CAAC,IAAI,CAAC;;;iBAGvE,SAAS,CAAC,IAAI,CAAC;iBACf,SAAS,CAAC,cAAc,+BAA+B,SAAS,CAAC,IAAI,CAAC;;;iBAGtE,SAAS,CAAC,IAAI,CAAC;mBACb,SAAS,CAAC,cAAc,+BAA+B,SAAS,CAAC,IAAI,CAAC;;;iBAGxE,SAAS,CAAC,IAAI,CAAC;gBAChB,SAAS,CAAC,cAAc,+BAA+B,SAAS,CAAC,IAAI,CAAC;;CAErF,CAAC,CAAC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { ColorTypes } from \"../types\";\nimport constants from \"../constants\";\n\nexport const styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tz-index: 1000;\n\t\tpointer-events: none;\n\t\tbox-sizing: border-box;\n\t\tfont-size: var(--og-font-size);\n\t\tfont-family: var(--og-font-family);\n\t}\n\n\t#inner {\n\t\tborder-radius: var(--og-base-radius);\n\t}\n\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.head, .body {\n\t\tpadding: 2px;\n\t}\n\n\t#triangle {\n\t\tposition: absolute;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\n\t#triangle-inner {\n\t\tposition: relative;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\n\t#triangle.left, #triangle.right {\n\t\tborder-top: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t\tborder-bottom: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t}\n\n\t#triangle.top, #triangle.bottom {\n\t\tborder-left: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t\tborder-right: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t}\n\n\t#triangle.left #triangle-inner, #triangle.right #triangle-inner {\n\t\tborder-top: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t\tborder-bottom: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t}\n\n\t#triangle.top #triangle-inner, #triangle.bottom #triangle-inner {\n\t\tborder-left: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t\tborder-right: ${constants.TOOLTIP_MARGIN}px solid transparent;\n\t}\n\n\t#triangle.left #triangle-inner {\n\t\ttop: -${constants.TOOLTIP_MARGIN}px;\n\t\tleft: 2px;\n\t}\n\n\t#triangle.right #triangle-inner {\n\t\ttop: -${constants.TOOLTIP_MARGIN}px;\n\t\tright: ${constants.TOOLTIP_MARGIN + 2}px;\n\t}\n\n\t#triangle.top #triangle-inner {\n\t\ttop: 2px;\n\t\tleft: -${constants.TOOLTIP_MARGIN}px;\n\t}\n\n\t#triangle.bottom #triangle-inner {\n\t\ttop: -${constants.TOOLTIP_MARGIN + 2}px;\n\t\tleft: -${constants.TOOLTIP_MARGIN}px;\n\t}\n\n`, ...Object.values(ColorTypes).map(type => css`\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.left {\n\t\tborder-right: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-border-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.right {\n\t\tborder-left: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-border-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.top {\n\t\tborder-bottom: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-border-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.bottom {\n\t\tborder-top: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-border-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.left #triangle-inner {\n\t\tborder-right: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.right #triangle-inner {\n\t\tborder-left: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.top #triangle-inner {\n\t\tborder-bottom: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n\n\t:host([color=\"${unsafeCSS(type)}\"]) #triangle.bottom #triangle-inner {\n\t\tborder-top: ${constants.TOOLTIP_MARGIN}px solid var(--og-colortype-${unsafeCSS(type)}-background-color);\n\t}\n`)];"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.62",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Core components",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fortawesome/fontawesome-svg-core": "6.4.2",
|
|
39
|
-
"@omegagrid/localize": "^0.6.
|
|
39
|
+
"@omegagrid/localize": "^0.6.62",
|
|
40
40
|
"@riovir/wc-fontawesome": "^0.1.9",
|
|
41
41
|
"color": "^4.2.3",
|
|
42
42
|
"date-fns": "^3.2.0",
|