@operato/popup
Advanced tools
Comparing version 2.0.0-alpha.114 to 2.0.0-alpha.116
@@ -6,2 +6,11 @@ # Change Log | ||
## [2.0.0-alpha.116](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.115...v2.0.0-alpha.116) (2024-05-04) | ||
### :rocket: New Features | ||
* ox-grist-personalizer ([426fb9e](https://github.com/hatiolab/operato/commit/426fb9e616cc3a7ed0972d1b367ed54d2cf97472)) | ||
## [2.0.0-alpha.114](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.113...v2.0.0-alpha.114) (2024-05-04) | ||
@@ -8,0 +17,0 @@ |
import '@material/web/icon/icon.js'; | ||
import { PropertyValues } from 'lit'; | ||
import { CSSResult, PropertyValues } from 'lit'; | ||
import { OxPopup } from './ox-popup'; | ||
@@ -8,3 +8,3 @@ /** | ||
export declare class OxPopupList extends OxPopup { | ||
static styles: import("lit").CSSResult[]; | ||
static styles: CSSResult[]; | ||
/** | ||
@@ -90,3 +90,3 @@ * A boolean property that, when set to true, allows multiple options to be selected in the popup list. | ||
*/ | ||
static open({ template, top, left, right, bottom, parent, multiple, attrSelected }: { | ||
static open({ template, top, left, right, bottom, parent, multiple, attrSelected, styles }: { | ||
template: unknown; | ||
@@ -100,3 +100,4 @@ top?: number; | ||
attrSelected?: string; | ||
styles: CSSResult; | ||
}): OxPopupList; | ||
} |
@@ -263,5 +263,11 @@ import { __decorate } from "tslib"; | ||
*/ | ||
static open({ template, top, left, right, bottom, parent, multiple, attrSelected }) { | ||
static open({ template, top, left, right, bottom, parent, multiple, attrSelected, styles }) { | ||
const owner = parent || document.body; | ||
const target = document.createElement('ox-popup-list'); | ||
if (styles) { | ||
const style = document.createElement('style'); | ||
style.textContent = styles.cssText; | ||
const shadow = target.attachShadow({ mode: 'open' }); | ||
shadow.appendChild(style); | ||
} | ||
if (!!multiple) { | ||
@@ -268,0 +274,0 @@ target.setAttribute('multiple', ''); |
@@ -5,3 +5,3 @@ { | ||
"author": "heartyoh", | ||
"version": "2.0.0-alpha.114", | ||
"version": "2.0.0-alpha.116", | ||
"main": "dist/src/index.js", | ||
@@ -100,3 +100,3 @@ "module": "dist/src/index.js", | ||
}, | ||
"gitHead": "28420fb1210e6d9dac426ae9493413568c886d6b" | ||
"gitHead": "ed8f106ca422d5479a869c700d5bc4786fff849f" | ||
} |
import '@material/web/icon/icon.js' | ||
import { css, html, PropertyValues } from 'lit' | ||
import { css, CSSResult, html, PropertyValues } from 'lit' | ||
import { render } from 'lit-html' | ||
@@ -452,3 +452,4 @@ import { customElement, property, query, state } from 'lit/decorators.js' | ||
multiple, | ||
attrSelected | ||
attrSelected, | ||
styles | ||
}: { | ||
@@ -463,2 +464,3 @@ template: unknown | ||
attrSelected?: string | ||
styles: CSSResult | ||
}): OxPopupList { | ||
@@ -468,2 +470,10 @@ const owner = parent || document.body | ||
if (styles) { | ||
const style = document.createElement('style') | ||
style.textContent = styles.cssText | ||
const shadow = target.attachShadow({ mode: 'open' }) | ||
shadow.appendChild(style) | ||
} | ||
if (!!multiple) { | ||
@@ -470,0 +480,0 @@ target.setAttribute('multiple', '') |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
511099
6041