@elenajs/elements 0.0.2 → 0.0.3
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/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../src/button/button.js"],"sourcesContent":["import { Elena, defineElement } from \"@elenajs/core\";\n\nconst options = {\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../src/button/button.js"],"sourcesContent":["import { Elena, defineElement } from \"@elenajs/core\";\n\nconst options = {\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n * Button component is used for interface actions.\n *\n * @displayName Button\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-button-color-text] - Controls the color of the text.\n * @cssprop [--elena-button-color-bg] - Controls the color of the background.\n * @cssprop [--elena-button-color-border] - Controls the color of the border.\n * @cssprop [--elena-button-radius] - Controls the radius of the component.\n */\nexport default class Button extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The style variant of the button.\n *\n * @attribute\n * @type {(\"default\" | \"primary\" | \"danger\")}\n */\n this.variant = \"default\";\n\n /**\n * The size of the button.\n *\n * @attribute\n * @type {(\"sm\" | \"md\" | \"lg\")}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The value used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The type of the button.\n *\n * @attribute\n * @type {(\"submit\" | \"reset\" | \"button\")}\n */\n this.type = \"button\";\n }\n\n /**\n * Renders the custom element template.\n *\n * @internal\n */\n render() {\n const slottedContent = this.textContent.trim();\n\n this.template`\n <button\n class=\"elena-button\"\n type=\"${this.type || \"button\"}\"\n ${this.name ? `name=\"${this.name}\"` : \"\"}\n ${this.value ? `value=\"${this.value}\"` : \"\"}\n ${this.disabled ? \"disabled\" : \"\"}>\n ${slottedContent}\n </button>\n `;\n }\n}\n\n/**\n * Register the custom element\n */\ndefineElement(\"elena-button\", Button);\n"],"names":["options","props","events","element","Button","Elena","HTMLElement","constructor","super","this","variant","size","disabled","name","value","type","render","slottedContent","textContent","trim","template","defineElement"],"mappings":"+CAEA,MAAMA,EAAU,CACdC,MAAO,CAAC,UAAW,OAAQ,WAAY,OAAQ,QAAS,QACxDC,OAAQ,CAAC,QAAS,QAAS,QAC3BC,QAAS,iBAkBI,MAAMC,UAAeC,EAAMC,YAAaN,IACrD,WAAAO,GACEC,QAQAC,KAAKC,QAAU,UAQfD,KAAKE,KAAO,KAQZF,KAAKG,UAAW,EAQhBH,KAAKI,KAAO,GAQZJ,KAAKK,MAAQ,GAQbL,KAAKM,KAAO,QACd,CAOA,MAAAC,GACE,MAAMC,EAAiBR,KAAKS,YAAYC,OAExCV,KAAKW,QAAQ;;;gBAGDX,KAAKM,MAAQ;UACnBN,KAAKI,KAAO,SAASJ,KAAKI,QAAU;UACpCJ,KAAKK,MAAQ,UAAUL,KAAKK,SAAW;UACvCL,KAAKG,SAAW,WAAa;YAC3BK;;KAGV,EAMFI,EAAc,eAAgBjB"}
|
|
@@ -112,7 +112,7 @@ export type StackProps = {};
|
|
|
112
112
|
|
|
113
113
|
export type CustomElements = {
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Button component is used for interface actions.
|
|
116
116
|
* ---
|
|
117
117
|
*
|
|
118
118
|
*
|
|
@@ -148,7 +148,8 @@ export type CustomElements = {
|
|
|
148
148
|
"elena-input": Partial<InputProps & BaseProps & BaseEvents>;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
151
|
+
* Stack component manages layout of immediate children
|
|
152
|
+
* with optional spacing between each child.
|
|
152
153
|
* ---
|
|
153
154
|
*
|
|
154
155
|
*/
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"declarations": [
|
|
24
24
|
{
|
|
25
25
|
"kind": "class",
|
|
26
|
-
"description": "
|
|
26
|
+
"description": "Button component is used for interface actions.",
|
|
27
27
|
"name": "Button",
|
|
28
28
|
"cssProperties": [
|
|
29
29
|
{
|
|
@@ -445,7 +445,7 @@
|
|
|
445
445
|
"declarations": [
|
|
446
446
|
{
|
|
447
447
|
"kind": "class",
|
|
448
|
-
"description": "
|
|
448
|
+
"description": "Stack component manages layout of immediate children\nwith optional spacing between each child.",
|
|
449
449
|
"name": "Stack",
|
|
450
450
|
"mixins": [
|
|
451
451
|
{
|
package/dist/stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","sources":["../src/stack/stack.js"],"sourcesContent":["import { Elena, defineElement } from \"@elenajs/core\";\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"stack.js","sources":["../src/stack/stack.js"],"sourcesContent":["import { Elena, defineElement } from \"@elenajs/core\";\n\n/**\n * Stack component manages layout of immediate children\n * with optional spacing between each child.\n *\n * @displayName Stack\n * @status alpha\n */\nexport default class Stack extends Elena(HTMLElement) {\n constructor() {\n super();\n }\n}\n\n/**\n * Register the custom element\n */\ndefineElement(\"elena-stack\", Stack);\n"],"names":["Stack","Elena","HTMLElement","constructor","super","defineElement"],"mappings":"+CASe,MAAMA,UAAcC,EAAMC,cACvC,WAAAC,GACEC,OACF,EAMFC,EAAc,cAAeL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elenajs/elements",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "An example Elena custom element library",
|
|
5
5
|
"author": "Ariel Salminen <info@arielsalminen.com>",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"rollup-plugin-copy": "3.5.0",
|
|
35
35
|
"rollup-plugin-summary": "3.0.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "c45ea096f28f5b1873ae377452a07a0dd1d7bf4e"
|
|
38
38
|
}
|