@ewc-lib/ewc-icon-button-group 1.0.3-alpha → 2.0.0-alpha
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ewc-lib/ewc-icon-button-group",
|
|
3
3
|
"//": "please always keep version in sync with constructor in main.js",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-alpha",
|
|
5
5
|
"basedOnStandard": "3.0.1",
|
|
6
6
|
"description": "",
|
|
7
7
|
"main": "src/main.js",
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
"@ewc-lib/ewc-css-common": "0.1.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ewc-lib/ewc-icon-button": "
|
|
19
|
+
"@ewc-lib/ewc-icon-button": "2.0.0-alpha"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/readme.md
CHANGED
|
@@ -115,6 +115,9 @@ European Union Public License (EUPL)
|
|
|
115
115
|
|
|
116
116
|
# Changelog
|
|
117
117
|
|
|
118
|
+
- 2.0.0-alpha
|
|
119
|
+
- update icons: linechart, barchart, hilo-chart (dotplot), table
|
|
120
|
+
|
|
118
121
|
- 1.0.2-alpha
|
|
119
122
|
- when pressed no checkmark displayed but keep the icon
|
|
120
123
|
- introduce narrow width display
|
package/src/main.js
CHANGED
|
@@ -68,7 +68,7 @@ class Element extends HTMLElement {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
connectedCallback() {
|
|
71
|
-
this.setAttribute("ewc-version", "
|
|
71
|
+
this.setAttribute("ewc-version", "2.0.0-alpha") // please always keep in sync with version in package.json
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
constructor() {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
\************************/
|
|
17
17
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18
18
|
|
|
19
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(cssClassPrefix, breakpoint) {\n const t = document.createElement('style')\n t.innerHTML = cssString(cssClassPrefix, breakpoint)\n return t\n}\n\n\nfunction cssString(cssClassPrefix, breakpoint) {\n return `\n\n .${cssClassPrefix} {\n
|
|
19
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(cssClassPrefix, breakpoint) {\n const t = document.createElement('style')\n t.innerHTML = cssString(cssClassPrefix, breakpoint)\n return t\n}\n\n\nfunction cssString(cssClassPrefix, breakpoint) {\n return `\n\n .${cssClassPrefix} {\n display: flex;\n }\n .${cssClassPrefix} ewc-icon-button::part(button) {\n display:flex;\n align-items:center;\n border: solid 1px var(--c-p);\n color: var(--icon-color);\n margin-left: -1px; /* thin 1px separation between the buttons */\n max-width: 125px;\n min-width: 125px;\n height: 45px;\n }\n .${cssClassPrefix} ewc-icon-button:first-of-type::part(button) {\n border-bottom-left-radius: 50px;\n border-top-left-radius: 50px;\n }\n .${cssClassPrefix} ewc-icon-button:last-of-type::part(button) {\n border-bottom-right-radius: 50px;\n border-top-right-radius: 50px;\n }\n @media screen and (max-width: ${breakpoint}) {\n .${cssClassPrefix} ewc-icon-button::part(button) {\n max-width: var(--self-width);\n min-width: var(--self-width); \n }\n .${cssClassPrefix} ewc-icon-button::part(label) {\n display: none;\n }\n }\n\n`}\n\n\n//# sourceURL=webpack://@ewc-lib/ewc-icon-button-group-example/../../src/css.js?");
|
|
20
20
|
|
|
21
21
|
/***/ }),
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
26
26
|
\*************************/
|
|
27
27
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
28
28
|
|
|
29
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css.js */ \"../../src/css.js\");\n/*\nbutton-group: min 1 and max 1 button can be in pressed down state.\n\nkeyboard navigation:\n- a group can't get a focus\n- buttons in the group can get a focus\n- only not-pressed buttons can get a focus\n- left/up and right/down keys move the focus\n- enter and space key presses a button, releases the currently pressed button\n*/\n\n\n\n\nclass ButtonGroup {\n #pressedBtnElement = null\n #pressedBtnElementIcon = null\n #currentIndex\n\n #storeCurrentBtn(el) {\n if(el) {\n this.#pressedBtnElement=el\n this.#pressedBtnElementIcon=el.getAttribute(\"icon\")\n }\n }\n\n #restoreCurrent() {\n if(this.#pressedBtnElement) {\n this.#pressedBtnElement.setAttribute(\"icon\", this.#pressedBtnElementIcon)\n }\n }\n\n setPressed(allElements, selectedElIdx) {\n this.#restoreCurrent()\n for(let i=0;i<allElements.length;i++) {\n const el = allElements[i]\n if(i===selectedElIdx){\n el.setAttribute(\"tabindex\",\"-1\")\n el.setAttribute(\"state\",\"true\")\n this.#storeCurrentBtn(el)\n } else {\n el.setAttribute(\"tabindex\",\"0\")\n el.setAttribute(\"state\",\"false\")\n }\n }\n this.#currentIndex = Number(selectedElIdx)\n }\n\n getCurrentIndex() {\n return this.#currentIndex\n }\n\n getCurrentElement() {\n return this.#pressedBtnElement\n }\n}\n\n\nclass Element extends HTMLElement {\n // only affect ewc-icon-buttons which are children of this element\n #cssClassPrefix = \"css-scope-\"+ (Math.random() + 1).toString(36).substring(2)\n \n #buttonGroup = new ButtonGroup()\n\n getAttr(name, _default) {\n const r = this.hasAttribute(name) ? this.getAttribute(name) : _default\n return r\n }\n\n connectedCallback() {\n this.setAttribute(\"ewc-version\", \"1.0.
|
|
29
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css.js */ \"../../src/css.js\");\n/*\nbutton-group: min 1 and max 1 button can be in pressed down state.\n\nkeyboard navigation:\n- a group can't get a focus\n- buttons in the group can get a focus\n- only not-pressed buttons can get a focus\n- left/up and right/down keys move the focus\n- enter and space key presses a button, releases the currently pressed button\n*/\n\n\n\n\nclass ButtonGroup {\n #pressedBtnElement = null\n #pressedBtnElementIcon = null\n #currentIndex\n\n #storeCurrentBtn(el) {\n if(el) {\n this.#pressedBtnElement=el\n this.#pressedBtnElementIcon=el.getAttribute(\"icon\")\n }\n }\n\n #restoreCurrent() {\n if(this.#pressedBtnElement) {\n this.#pressedBtnElement.setAttribute(\"icon\", this.#pressedBtnElementIcon)\n }\n }\n\n setPressed(allElements, selectedElIdx) {\n this.#restoreCurrent()\n for(let i=0;i<allElements.length;i++) {\n const el = allElements[i]\n if(i===selectedElIdx){\n el.setAttribute(\"tabindex\",\"-1\")\n el.setAttribute(\"state\",\"true\")\n this.#storeCurrentBtn(el)\n } else {\n el.setAttribute(\"tabindex\",\"0\")\n el.setAttribute(\"state\",\"false\")\n }\n }\n this.#currentIndex = Number(selectedElIdx)\n }\n\n getCurrentIndex() {\n return this.#currentIndex\n }\n\n getCurrentElement() {\n return this.#pressedBtnElement\n }\n}\n\n\nclass Element extends HTMLElement {\n // only affect ewc-icon-buttons which are children of this element\n #cssClassPrefix = \"css-scope-\"+ (Math.random() + 1).toString(36).substring(2)\n \n #buttonGroup = new ButtonGroup()\n\n getAttr(name, _default) {\n const r = this.hasAttribute(name) ? this.getAttribute(name) : _default\n return r\n }\n\n connectedCallback() {\n this.setAttribute(\"ewc-version\", \"1.0.3-alpha\")\t\t// please always keep in sync with version in package.json\n }\n\n constructor() {\t\n super()\n this.classList.add(this.#cssClassPrefix)\n this.appendChild((0,_css_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.#cssClassPrefix, this.getAttr(\"breakpoint\",\"480px\")).cloneNode(true)) // .ecl-col-s- in ECL 4.8.1.\n this.#installEventHandlers()\n }\n\n static observedAttributes = [\"selectedindex\"]\n\n attributeChangedCallback(name, oldValue, newValue) {\n if (name===\"selectedindex\") {\n //console.log(Number(newValue),this.#buttonGroup.getCurrentIndex())\n if(Number(newValue)!==this.#buttonGroup.getCurrentIndex()) {\n this.#buttonGroup.setPressed(this.querySelectorAll(\"ewc-icon-button\"), Number(newValue))\n }\n }\n }\n\n #installEventHandlers() {\n\n const nodes = this.querySelectorAll(\"ewc-icon-button\")\n\n // relay click/enter presses\n for(let i=0;i<nodes.length;i++) {\n nodes[i].addEventListener(\"action\", (ev) => {\n ev.stopPropagation()\n if(this.#buttonGroup.getCurrentIndex() !== i) {\n const event = new CustomEvent(\"action\", { detail: i});\n this.dispatchEvent(event)\n }\n })\n nodes[i].setAttribute(\"__index\", i)\n }\n\n // move focus w/ tab. TODO: make the code elegant\n\t\tthis.addEventListener(\"keydown\", function(ev) {\n let idx = Number(document.activeElement.getAttribute(\"__index\"))\n const nodes = this.querySelectorAll(\"ewc-icon-button\")\n\n\t\t\tif(ev.key==\"ArrowLeft\" || ev.key==\"ArrowUp\") {\n idx-=1\n if(idx<0) {idx=nodes.length-1}\n if(nodes[idx].getAttribute(\"tabindex\")==\"-1\") {\n idx-=1\n if(idx<0) {idx=nodes.length-1}\n }\n nodes[idx].focus()\n }\n if(ev.key==\"ArrowRight\" || ev.key==\"ArrowDown\") {\n idx+=1\n if(idx>nodes.length-1) {idx=0}\n if(nodes[idx].getAttribute(\"tabindex\")==\"-1\") {\n idx+=1\n if(idx>nodes.length-1) {idx=0}\n }\n nodes[idx].focus()\n }\n }.bind(this))\n\t}\n\n getCurrentlySelectedIndex() {\n return this.#buttonGroup.getCurrentIndex()\n }\n\n getCurrentlySelectedElement() {\n return this.#buttonGroup.getCurrentElement()\n }\n}\n\n\n\nif (window.customElements.get(\"ewc-icon-button-group\")) {\n console.warn(\"ewc-icon-button-group: custom element is already defined\")\n} else {\n window.customElements.define(\"ewc-icon-button-group\", Element);\n}\n\n\n//# sourceURL=webpack://@ewc-lib/ewc-icon-button-group-example/../../src/main.js?");
|
|
30
30
|
|
|
31
31
|
/***/ }),
|
|
32
32
|
|
|
@@ -66,7 +66,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
66
66
|
\**********************************************************/
|
|
67
67
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68
68
|
|
|
69
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() {\n return getStyleTag( get() )\n}\n\n\nfunction get() {\n return `\n button {\n all: unset;\n background-color: var(--background-color);\n
|
|
69
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() {\n return getStyleTag( get() )\n}\n\n\nfunction get() {\n return `\n button {\n all: unset;\n background-color: var(--background-color);\n display: flex;\n align-content: center;\n justify-content: center;\n cursor: pointer;\n }\n\n span {\n align-content: center;\n justify-content: center;\n }\n\n button > svg {\n align-self:center;\n }\n\n button:hover {\n background-color: var(--background-color-hover);\n --icon-color: var(--icon-color-hover);\n --backdrop-color: var(--backdrop-color-hover);\n }\n`}\n\n\n// helper\nfunction getStyleTag(source) {\n const t = document.createElement('style')\n t.innerHTML = source\n return t\n}\n\n\n//# sourceURL=webpack://@ewc-lib/ewc-icon-button-group-example/./node_modules/@ewc-lib/ewc-icon-button/src/css.js?");
|
|
70
70
|
|
|
71
71
|
/***/ }),
|
|
72
72
|
|
|
@@ -86,7 +86,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
86
86
|
\***********************************************************/
|
|
87
87
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
88
88
|
|
|
89
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./html.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/html.js\");\n/* harmony import */ var _cfg_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cfg.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/cfg.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./css.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/css.js\");\n/*\na button displaying one of a set of given icons.\n\nit's state can be true (pressed), false (not pressed) or disabled (not focusable).\neach state has it's own, visual representation.\nit has focus and hover effects.\nenter and click are captured, prevented and instead one event \"action\" is dispatched.\n\n\nImportant note:\nThe runtime-change of backdropStyle is not fully implemented.\n*/\n\n\t\t// keep this file html free\n\n\n\n\nclass Element extends HTMLElement {\n\n\t#icon\t\t\t\t\t// one of [close, lineChart, barChart, dotPlot, table, share, info, download]\n\t#configId\t\t\t// is the same as #icon per default\n\t#size\t\t\t\t\t// valid CSS
|
|
89
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./html.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/html.js\");\n/* harmony import */ var _cfg_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cfg.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/cfg.js\");\n/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./css.js */ \"./node_modules/@ewc-lib/ewc-icon-button/src/css.js\");\n/*\na button displaying one of a set of given icons.\n\nit's state can be true (pressed), false (not pressed) or disabled (not focusable).\neach state has it's own, visual representation.\nit has focus and hover effects.\nenter and click are captured, prevented and instead one event \"action\" is dispatched.\n\n\nImportant note:\nThe runtime-change of backdropStyle is not fully implemented.\n*/\n\n\t\t// keep this file html free\n\n\n\n\nclass Element extends HTMLElement {\n\n\t#icon\t\t\t\t\t// one of [close, lineChart, barChart, dotPlot, table, share, info, download]\n\t#configId\t\t\t// is the same as #icon per default\n\t#size\t\t\t\t\t// icon size. valid CSS string.\n\t#state\t\t\t\t// tristate, one of [true,false,disabled]\n\t#bg\t\t\t\t\t\t// kind of background: \"dark\" or \"light\"\n\t#bd\t\t\t\t\t\t// backdrop form (eg circle or square)\n\t#label\t\t\t\t// text right to the icon\n\n\tgetAttr(name, _default) {\n\t\tconst r = this.hasAttribute(name) ? this.getAttribute(name) : _default\n\t\treturn r\n\t}\n\n\tconstructor() {\t\n\t\tsuper()\t\n\n\t\tthis.#icon = this.getAttr(\"icon\").toLowerCase()\n\t\tthis.#configId = this.hasAttribute(\"use-config\") ? this.getAttr(\"use-config\").toLowerCase() : this.#icon\n\t\tif(![\"close\", \"linechart\", \"barchart\", \"dotplot\", \"table\", \"star\", \"share\", \"info\", \"download\", \"calendar\"].includes(this.#icon) ) {\n\t\t\tconst err = \"ewc-icon-button: invalid icon specified\"\n\t\t\tconsole.error(err)\n\t\t\tthrow new Error(err)\n\t\t}\n\n\t\tthis.#size = this.getAttr(\"size\", 35)\n\n\t\tthis.#bg = this.getAttr(\"background\",\"light\")\n\t\tthis.#label = this.getAttr(\"label\",\"\")\n\t\tthis.#state = this.getAttribute(\"state\")===\"true\"\n\n\t\tthis.#applyLook(this.#state)\n\n\t\tthis.attachShadow({mode: 'open'})\n\n\t\tconst w = this.#size\n\t\tconst h = this.#size\n\t\tthis.shadowRoot.appendChild(_html_js__WEBPACK_IMPORTED_MODULE_0__.get( this.#icon, w, h, this.#bd, this.#label, this.getAttr(\"btn-aria-label\", \"button\")).cloneNode(true))\n\t\tthis.shadowRoot.appendChild((0,_css_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])().cloneNode(true))\n\t\tthis.#installEventHandlers()\n\n\t}\n\n\tconnectedCallback() {\n\t\tthis.setAttribute(\"ewc-version\", \"1.1.0-alpha\")\t\t// please always keep in sync with version in package.json\n\t\tthis.setAttribute(\"tabindex\", \"0\")\n\t}\n\n\tstatic get observedAttributes() { return [\"icon\", \"background\", \"state\", \"size\", \"label\", \"use-config\", \"btn-aria-label\"] }\n\n attributeChangedCallback(name, oldValue, newValue) {\n\t\tif(name===\"use-config\") {\n\t\t\tthis.#configId = newValue\n\t\t\tthis.#applyLook(this.#state)\n\t\t}\n \tif(name === \"icon\") {\n\t\t\tconst icon = this.shadowRoot.querySelector(\"#icon\")\n\t\t\tif(icon) {icon.remove()}\n\t\t\tconst svg = this.shadowRoot.querySelector(\"svg\")\n\t\t\tif(svg) {svg.appendChild(_html_js__WEBPACK_IMPORTED_MODULE_0__.getIcon(newValue))}\n\n\t\t\tthis.#icon = this.getAttr(\"icon\").toLowerCase()\n\t\t\tthis.#applyLook(this.#state)\n\t\t}\n \tif(name === 'state') {\n\t\t\tif([\"disabled\",\"true\",\"false\"].includes(newValue)) {\n\t\t\t\tthis.#state = newValue===\"disabled\"?newValue:newValue===\"true\"\n\t\t\t\tthis.setAttribute(\"aria-pressed\", this.#state===\"true\")\n\t\t\t\tthis.setAttribute(\"tabindex\", this.#state===\"disabled\"?\"-1\":this.getAttribute(\"tabindex\"))\n\t\t\t\tthis.setAttribute(\"aria-disabled\", this.#state===\"disabled\"?\"true\":\"false\")\n\t\t\t} else {\n\t\t\t\t// default\n\t\t\t\tthis.#state = false\n\t\t\t\tthis.setAttribute(\"aria-pressed\", \"false\")\n\t\t\t\tthis.setAttribute(\"tabindex\", \"0\")\n\t\t\t\tthis.setAttribute(\"aria-disabled\", \"false\")\n\t\t\t}\n\t\t\tthis.#applyLook(this.#state)\n\t\t}\n \tif(name === 'background') {\n\t\t\tthis.#bg = newValue===\"dark\"?\"dark\":\"light\"\n\t\t\tthis.#applyLook(this.#state)\n\t\t}\n \tif(name === 'size') {\n\t\t\tthis.#size = newValue\n\t\t\tthis.#applyLook(this.#state)\n\t\t}\n \tif(name === 'label') {\n\t\t\tthis.shadowRoot.querySelector(\"span\").textContent = newValue\n\t\t}\n \tif(name === 'btn-aria-label') {\n\t\t\tthis.shadowRoot.querySelector(\"button\").setAttribute(\"aria-label\", newValue)\n\t\t}\n }\n\n\t#installEventHandlers() {\n\t\tthis.addEventListener(\"click\", (ev) => {\n\t\t\tif(this.#state!==\"disabled\") {\n\t\t\t\tconst event = new Event(\"action\",{bubbles: true})\n\t\t\t\tthis.dispatchEvent(event)\n\t\t\t\tev.stopPropagation()\n\t\t\t\tev.preventDefault()\n\t\t\t}\n\t\t})\n\t\tthis.addEventListener(\"keydown\", (ev) => {\n\t\t\tif(ev.key==\"Enter\" || ev.key==\" \") {\n\t\t\t\tif(this.#state!==\"disabled\") {\n\t\t\t\t\tconst event = new Event(\"action\",{bubbles: true})\n\t\t\t\t\tthis.dispatchEvent(event)\n\t\t\t\t\tev.stopPropagation()\n\t\t\t\t\tev.preventDefault()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\t#applyLook(state) {\n\t\tconst [iconColor, backdropStyle, backdropColor, backgroundColor] = (0,_cfg_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.#configId, this.#bg, state, false)\n\t\tconst [iconColorH, backdropStyleH, backdropColorH, backgroundColorH] = (0,_cfg_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.#configId, this.#bg, state, true)\n\n\t\tthis.style.setProperty(\"--background-color\", backgroundColor)\n\t\tthis.style.setProperty(\"--backdrop-color\", backdropColor)\n\t\tthis.style.setProperty(\"--icon-color\", iconColor)\n\n\t\tthis.style.setProperty(\"--background-color-hover\", backgroundColorH)\n\t\tthis.style.setProperty(\"--backdrop-color-hover\", backdropColorH)\n\t\tthis.style.setProperty(\"--icon-color-hover\", iconColorH)\n\n\t\tthis.#bd = backdropStyle\n\t}\n\n\tset state(val) {\n\t\tthis.setAttribute(\"state\", val)\n\t}\n\n\tget state() {\n\t\treturn this.#state\n\t}\n\n\ttoggle() {\n\t\tif(this.#state!==\"disabled\") {\n\t\t\tthis.state = !Boolean(this.state)\n\t\t}\n\t}\n\n}\n\nif (window.customElements.get(\"ewc-icon-button\")) {\n console.warn(\"ewc-icon-button: custom element is already defined\")\n} else {\n window.customElements.define(\"ewc-icon-button\", Element);\n}\n\n\n//# sourceURL=webpack://@ewc-lib/ewc-icon-button-group-example/./node_modules/@ewc-lib/ewc-icon-button/src/main.js?");
|
|
90
90
|
|
|
91
91
|
/***/ }),
|
|
92
92
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"version": "0.0.1",
|
|
10
10
|
"license": "EUPL v.1.1",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@ewc-lib/ewc-icon-button": "1.0
|
|
12
|
+
"@ewc-lib/ewc-icon-button": "1.1.0-alpha",
|
|
13
13
|
"@ewc-lib/ewc-icon-button-group": "file:../../"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
},
|
|
27
27
|
"../..": {
|
|
28
28
|
"name": "@ewc-lib/ewc-icon-button-group",
|
|
29
|
-
"version": "1.0.
|
|
29
|
+
"version": "1.0.3-alpha",
|
|
30
30
|
"license": "EUPL v.1.1",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ewc-lib/ewc-icon-button": "1.0
|
|
32
|
+
"@ewc-lib/ewc-icon-button": "1.1.0-alpha"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@ewc-lib/ewc-css-common": "0.1.0"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"peer": true
|
|
54
54
|
},
|
|
55
55
|
"node_modules/@ewc-lib/ewc-icon-button": {
|
|
56
|
-
"version": "1.0
|
|
57
|
-
"resolved": "https://registry.npmjs.org/@ewc-lib/ewc-icon-button/-/ewc-icon-button-1.0
|
|
58
|
-
"integrity": "sha512
|
|
56
|
+
"version": "1.1.0-alpha",
|
|
57
|
+
"resolved": "https://registry.npmjs.org/@ewc-lib/ewc-icon-button/-/ewc-icon-button-1.1.0-alpha.tgz",
|
|
58
|
+
"integrity": "sha512-Vqy+B3GoWL6AwmRdEpCynyYopdJEw8jy88BkwRubBJOZpv8NK01fnozJ6BXf/FI3tdI50b8M5rPdbkfvqDl4wg==",
|
|
59
59
|
"license": "EUPL v.1.1",
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@ewc-lib/ewc-css-common": "0.1.0"
|
|
@@ -194,9 +194,9 @@
|
|
|
194
194
|
"license": "MIT"
|
|
195
195
|
},
|
|
196
196
|
"node_modules/@types/body-parser": {
|
|
197
|
-
"version": "1.19.
|
|
198
|
-
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.
|
|
199
|
-
"integrity": "sha512-
|
|
197
|
+
"version": "1.19.6",
|
|
198
|
+
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
|
|
199
|
+
"integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==",
|
|
200
200
|
"dev": true,
|
|
201
201
|
"license": "MIT",
|
|
202
202
|
"dependencies": {
|
|
@@ -265,9 +265,9 @@
|
|
|
265
265
|
"license": "MIT"
|
|
266
266
|
},
|
|
267
267
|
"node_modules/@types/express": {
|
|
268
|
-
"version": "4.17.
|
|
269
|
-
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.
|
|
270
|
-
"integrity": "sha512-
|
|
268
|
+
"version": "4.17.23",
|
|
269
|
+
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz",
|
|
270
|
+
"integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==",
|
|
271
271
|
"dev": true,
|
|
272
272
|
"license": "MIT",
|
|
273
273
|
"dependencies": {
|
|
@@ -298,9 +298,9 @@
|
|
|
298
298
|
"license": "MIT"
|
|
299
299
|
},
|
|
300
300
|
"node_modules/@types/http-errors": {
|
|
301
|
-
"version": "2.0.
|
|
302
|
-
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.
|
|
303
|
-
"integrity": "sha512-
|
|
301
|
+
"version": "2.0.5",
|
|
302
|
+
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz",
|
|
303
|
+
"integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==",
|
|
304
304
|
"dev": true,
|
|
305
305
|
"license": "MIT"
|
|
306
306
|
},
|
|
@@ -329,13 +329,13 @@
|
|
|
329
329
|
"license": "MIT"
|
|
330
330
|
},
|
|
331
331
|
"node_modules/@types/node": {
|
|
332
|
-
"version": "
|
|
333
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-
|
|
334
|
-
"integrity": "sha512-
|
|
332
|
+
"version": "24.0.3",
|
|
333
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz",
|
|
334
|
+
"integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==",
|
|
335
335
|
"dev": true,
|
|
336
336
|
"license": "MIT",
|
|
337
337
|
"dependencies": {
|
|
338
|
-
"undici-types": "~
|
|
338
|
+
"undici-types": "~7.8.0"
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
341
|
"node_modules/@types/node-forge": {
|
|
@@ -370,9 +370,9 @@
|
|
|
370
370
|
"license": "MIT"
|
|
371
371
|
},
|
|
372
372
|
"node_modules/@types/send": {
|
|
373
|
-
"version": "0.17.
|
|
374
|
-
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.
|
|
375
|
-
"integrity": "sha512-
|
|
373
|
+
"version": "0.17.5",
|
|
374
|
+
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz",
|
|
375
|
+
"integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==",
|
|
376
376
|
"dev": true,
|
|
377
377
|
"license": "MIT",
|
|
378
378
|
"dependencies": {
|
|
@@ -391,9 +391,9 @@
|
|
|
391
391
|
}
|
|
392
392
|
},
|
|
393
393
|
"node_modules/@types/serve-static": {
|
|
394
|
-
"version": "1.15.
|
|
395
|
-
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.
|
|
396
|
-
"integrity": "sha512-
|
|
394
|
+
"version": "1.15.8",
|
|
395
|
+
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz",
|
|
396
|
+
"integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==",
|
|
397
397
|
"dev": true,
|
|
398
398
|
"license": "MIT",
|
|
399
399
|
"dependencies": {
|
|
@@ -669,9 +669,9 @@
|
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
671
|
"node_modules/acorn": {
|
|
672
|
-
"version": "8.
|
|
673
|
-
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.
|
|
674
|
-
"integrity": "sha512-
|
|
672
|
+
"version": "8.15.0",
|
|
673
|
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
|
674
|
+
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
|
675
675
|
"dev": true,
|
|
676
676
|
"license": "MIT",
|
|
677
677
|
"bin": {
|
|
@@ -958,9 +958,9 @@
|
|
|
958
958
|
}
|
|
959
959
|
},
|
|
960
960
|
"node_modules/caniuse-lite": {
|
|
961
|
-
"version": "1.0.
|
|
962
|
-
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.
|
|
963
|
-
"integrity": "sha512-
|
|
961
|
+
"version": "1.0.30001724",
|
|
962
|
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz",
|
|
963
|
+
"integrity": "sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==",
|
|
964
964
|
"dev": true,
|
|
965
965
|
"funding": [
|
|
966
966
|
{
|
|
@@ -1438,9 +1438,9 @@
|
|
|
1438
1438
|
"license": "MIT"
|
|
1439
1439
|
},
|
|
1440
1440
|
"node_modules/electron-to-chromium": {
|
|
1441
|
-
"version": "1.5.
|
|
1442
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
1443
|
-
"integrity": "sha512-
|
|
1441
|
+
"version": "1.5.171",
|
|
1442
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.171.tgz",
|
|
1443
|
+
"integrity": "sha512-scWpzXEJEMrGJa4Y6m/tVotb0WuvNmasv3wWVzUAeCgKU0ToFOhUW6Z+xWnRQANMYGxN4ngJXIThgBJOqzVPCQ==",
|
|
1444
1444
|
"dev": true,
|
|
1445
1445
|
"license": "ISC"
|
|
1446
1446
|
},
|
|
@@ -2962,9 +2962,9 @@
|
|
|
2962
2962
|
}
|
|
2963
2963
|
},
|
|
2964
2964
|
"node_modules/postcss": {
|
|
2965
|
-
"version": "8.5.
|
|
2966
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
2967
|
-
"integrity": "sha512-
|
|
2965
|
+
"version": "8.5.6",
|
|
2966
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
|
|
2967
|
+
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
|
|
2968
2968
|
"dev": true,
|
|
2969
2969
|
"funding": [
|
|
2970
2970
|
{
|
|
@@ -3883,9 +3883,9 @@
|
|
|
3883
3883
|
}
|
|
3884
3884
|
},
|
|
3885
3885
|
"node_modules/terser": {
|
|
3886
|
-
"version": "5.
|
|
3887
|
-
"resolved": "https://registry.npmjs.org/terser/-/terser-5.
|
|
3888
|
-
"integrity": "sha512
|
|
3886
|
+
"version": "5.43.1",
|
|
3887
|
+
"resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz",
|
|
3888
|
+
"integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==",
|
|
3889
3889
|
"dev": true,
|
|
3890
3890
|
"license": "BSD-2-Clause",
|
|
3891
3891
|
"dependencies": {
|
|
@@ -4025,9 +4025,9 @@
|
|
|
4025
4025
|
}
|
|
4026
4026
|
},
|
|
4027
4027
|
"node_modules/undici-types": {
|
|
4028
|
-
"version": "
|
|
4029
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-
|
|
4030
|
-
"integrity": "sha512-
|
|
4028
|
+
"version": "7.8.0",
|
|
4029
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
|
4030
|
+
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
|
4031
4031
|
"dev": true,
|
|
4032
4032
|
"license": "MIT"
|
|
4033
4033
|
},
|