@rededor/cura 1.5.0-alpha.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-57c5b283.js +51 -0
- package/dist/cjs/app-globals-57c5b283.js.map +1 -0
- package/dist/cjs/cura-accordion_12.cjs.entry.js +1 -1
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +33 -28
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
- package/dist/{esm/app-globals-e54ee4c3.js → cjs/cura-theme-module-14544f5f.js} +25 -54
- package/dist/cjs/cura-theme-module-14544f5f.js.map +1 -0
- package/dist/cjs/cura.cjs.js +2 -1
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -1
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-module.js +21 -8
- package/dist/collection/api/modules/cura-theme-module.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +33 -28
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/index.js +5 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-transparent2.js +1 -1
- package/dist/components/cura-button-transparent2.js.map +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +33 -28
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/index.js +26 -9
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/{p-82b99090.js → p-1051a947.js} +2 -2
- package/dist/cura/p-1051a947.js.map +1 -0
- package/dist/cura/{p-04006a3e.entry.js → p-57ad7c56.entry.js} +2 -2
- package/dist/cura/{p-04006a3e.entry.js.map → p-57ad7c56.entry.js.map} +1 -1
- package/dist/cura/p-62a3056f.entry.js +2 -0
- package/dist/cura/p-62a3056f.entry.js.map +1 -0
- package/dist/cura/p-d21364b2.js +2 -0
- package/dist/cura/p-d21364b2.js.map +1 -0
- package/dist/cura/{p-0a133399.entry.js → p-dbab7864.entry.js} +2 -2
- package/dist/cura/{p-0a133399.entry.js.map → p-dbab7864.entry.js.map} +1 -1
- package/dist/cura/p-f30270f0.entry.js +2 -0
- package/dist/cura/p-f30270f0.entry.js.map +1 -0
- package/dist/esm/app-globals-036c3b80.js +49 -0
- package/dist/esm/app-globals-036c3b80.js.map +1 -0
- package/dist/esm/cura-accordion_12.entry.js +1 -1
- package/dist/esm/cura-accordion_12.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +1 -1
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-transparent.entry.js +1 -1
- package/dist/esm/cura-button-transparent.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search.entry.js +33 -28
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
- package/dist/{cjs/app-globals-f33ceef8.js → esm/cura-theme-module-b23f8ac8.js} +23 -56
- package/dist/esm/cura-theme-module-b23f8ac8.js.map +1 -0
- package/dist/esm/cura.js +2 -1
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -1
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/api/modules/cura-theme-module.d.ts +8 -6
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/app-globals-f33ceef8.js.map +0 -1
- package/dist/cura/p-82b99090.js.map +0 -1
- package/dist/cura/p-9d7c6e96.entry.js +0 -2
- package/dist/cura/p-9d7c6e96.entry.js.map +0 -1
- package/dist/cura/p-ced52230.entry.js +0 -2
- package/dist/cura/p-ced52230.entry.js.map +0 -1
- package/dist/esm/app-globals-e54ee4c3.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const curaThemeModule = require('./cura-theme-module-14544f5f.js');
|
|
4
|
+
|
|
5
|
+
class CuraAPI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
8
|
+
const themeModule = new curaThemeModule.CuraThemeModule();
|
|
9
|
+
this.theme = {
|
|
10
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
11
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
|
|
12
|
+
colors: {
|
|
13
|
+
getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
|
|
14
|
+
},
|
|
15
|
+
fonts: {
|
|
16
|
+
getFamily: function (type) { return themeModule.fonts.getFamily(type); },
|
|
17
|
+
getWeights: function () { return themeModule.fonts.getWeights(); },
|
|
18
|
+
getSize: function () { return themeModule.fonts.getSize(); },
|
|
19
|
+
getColor: function () { return themeModule.fonts.getColor(); }
|
|
20
|
+
},
|
|
21
|
+
spacing: {
|
|
22
|
+
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
23
|
+
},
|
|
24
|
+
breakpoints: {
|
|
25
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
if (config && config.customTheme) {
|
|
29
|
+
this.theme.setCustom(config.customTheme);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
33
|
+
this.theme.load(theme);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function appGlobalScript () {
|
|
39
|
+
const config = window.CuraInit;
|
|
40
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
41
|
+
const api = window.CuraAPI;
|
|
42
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
43
|
+
if (config && typeof config.onReady === 'function')
|
|
44
|
+
config.onReady(api);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const globalScripts = appGlobalScript;
|
|
48
|
+
|
|
49
|
+
exports.globalScripts = globalScripts;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=app-globals-57c5b283.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"app-globals-57c5b283.js","mappings":";;;;MAGqB,OAAO;IAK1B,YAAa,MAAmB;QAC9B,IAAI,CAAC,eAAe,GAAG,MAAM,IAAI,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,GAAG,SAAS,CAAC;QAC7F,MAAM,WAAW,GAAG,IAAIA,+BAAe,EAAE,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG;YACX,IAAI,EAAE,UAAS,QAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;YAChE,SAAS,EAAE,UAAS,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AO,GAAG,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;IAC3B,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,EAAC,GAAG,EAAC,EAAE,CAAC,CAAC,CAAC;IACzE,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;QAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","names":["CuraThemeModule"],"sources":["src/api/cura-api.ts","src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
|
@@ -230,7 +230,7 @@ const CuraButton = class {
|
|
|
230
230
|
render() {
|
|
231
231
|
const symbolColor = this.getSymbolColor();
|
|
232
232
|
const labelSize = curaButton_definitions.labelSizes[this.size] || curaButton_definitions.labelSizes["default"];
|
|
233
|
-
return (index.h(index.Host, { key: '07b87d98fb398bc2897e666dc8cd54734f20734d' }, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { class: "label", size: labelSize, lineHeight: '
|
|
233
|
+
return (index.h(index.Host, { key: '07b87d98fb398bc2897e666dc8cd54734f20734d' }, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { class: "label", size: labelSize, lineHeight: 'normal', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { class: "label", size: labelSize, lineHeight: 'normal', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor })))));
|
|
234
234
|
}
|
|
235
235
|
static get formAssociated() { return true; }
|
|
236
236
|
static get watchers() { return {
|