Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { html as render, query } from '@pluginjs/dom'
import html from './index.html'
// import Radio from '@pluginjs/radio'
query('input[type="radio"]', render(html, query('#cssSolidIcon')))
import { html as render, query } from '@pluginjs/dom'
import html from './index.html'
// import Radio from '@pluginjs/radio'
query('input[type="radio"]', render(html, query('#cssIcon')))
<span class="${this.classes.TRIGGER}"></span><div></div>
`,
this.element
)
this.$trigger = query(`.${this.classes.TRIGGER}`, this.$wrap)
this.$input = query('input', this.$wrap)
if (this.only) {
addClass(this.classes.ONLY, this.$trigger)
} else {
this.DROPDOWN = this.initDropdown()
}
if (this.isStatic(this.value)) {
html(this.value, this.$trigger)
addClass(this.classes.STATIC, this.$wrap)
} else {
this.$input.value = this.value.input
html(this.getUnit(), this.$trigger)
}
if (this.options.theme) {
addClass(this.getThemeClass(), this.$wrap)
}
if (this.element.getAttribute('disabled') || this.options.disabled) {
this.disable()
}
}
setPlaceholderLabel() {
if (isInput(this.$label)) {
this.$label.value = ''
} else {
html(this.placeholder, this.$label)
}
}
updateTrigger(option) {
html(option.label, this.$label)
this.$image.setAttribute('src', option.image)
}
setLabel(label) {
html(label, this.$label)
}
function setContent(content) {
html(content, that.pane)
that.leave('loading')
that.loaded = true
that.trigger(EVENTS.AFTERLOAD)
if (isFunction(callback)) {
callback.call(that)
}
}
setLabel(label) {
html(label, this.$label)
}