wj-elements 0.1.226 → 0.1.227

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/wje-input.js CHANGED
@@ -230,8 +230,8 @@ class Input extends FormAssociatedElement {
230
230
  });
231
231
  let errorSlot = document.createElement("slot");
232
232
  errorSlot.setAttribute("name", "error");
233
+ errorSlot.setAttribute("part", "error-slot");
233
234
  let error = document.createElement("div");
234
- error.setAttribute("part", "error");
235
235
  error.setAttribute("slot", "error");
236
236
  let start = null;
237
237
  if (hasSlotStart) {
@@ -1 +1 @@
1
- {"version":3,"file":"wje-input.js","sources":["../packages/wje-input/input.element.js","../packages/wje-input/input.js"],"sourcesContent":["import { FormAssociatedElement } from '../internals/form-associated-element.js';\nimport { event } from '../utils/event.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * @summary This class represents a custom input element. It extends the WJElement class and provides additional functionality for handling input.\n * @documentation https://elements.webjet.sk/components/input\n * @status stable\n * @augments {FormAssociatedElement}\n * @csspart native - The native part.\n * @csspart wrapper - The wrapper part.\n * @csspart input - The input part.\n * @csspart clear - The clear part.\n * @slot start - Slot for content at the start of the input.\n * @slot end - Slot for content at the end of the input.\n * @cssproperty [--wje-input-font-family=var(--wje-font-family)] - Defines the font family for the input text.\n * @cssproperty [--wje-input-background-color=var(--wje-background)] - Specifies the background color of the input field.\n * @cssproperty [--wje-input-color=var(--wje-color)] - Sets the text color within the input field.\n * @cssproperty [--wje-input-color-invalid=var(--wje-color-danger)] - Changes the text color when the input value is invalid.\n * @cssproperty [--wje-input-border-color=var(--wje-border-color)] - Defines the border color of the input field.\n * @cssproperty [--wje-input-border-color-focus=var(--wje-color-primary)] - Specifies the border color when the input is focused.\n * @cssproperty [--wje-input-border-width=1px] - Sets the width of the input border.\n * @cssproperty [--wje-input-border-style=solid] - Defines the border style of the input (e.g., solid, dashed).\n * @cssproperty [--wje-input-border-radius=4px] - Specifies the border radius, creating rounded corners.\n * @cssproperty [--wje-input-margin-bottom=.5rem] - Adds spacing below the input field.\n * @cssproperty [--wje-input-line-height=20px] - Sets the line height of the text within the input field.\n * @cssproperty [--wje-input-slot-padding-inline=.5rem] - Controls the padding on the left and right of the input slot content.\n * // @fires wje-input:input - Dispatched when the input value changes.\n * // @fires wje-input:clear - Dispatched when the input is cleared.\n */\nexport default class Input extends FormAssociatedElement {\n /**\n * Creates an instance of Input.\n */\n constructor() {\n super();\n\n this.invalid = false;\n this.pristine = true;\n }\n\n /**\n * Setter for the value attribute.\n * @param {string} value The value to set.\n */\n set value(value) {\n this.internals.setFormValue(value);\n\n if (this.input) this.input.value = value;\n\n this.pristine = false;\n this._value = value;\n }\n\n /**\n * Retrieves the value from the input element if available; otherwise,\n * returns the internal _value property or an empty string as the default.\n * @returns {string} The current value from the input element, the internal _value, or an empty string.\n */\n get value() {\n return this.input?.value ?? this._value ?? '';\n }\n\n /**\n * Sets the label attribute of the element.\n * @param {string} value The value to set as the label attribute.\n */\n set label(value) {\n this.setAttribute('label', value);\n }\n\n /**\n * Retrieves the value of the 'label' attribute if it exists.\n * If the 'label' attribute is not set, it returns false.\n * @returns {string|boolean} The value of the 'label' attribute as a string, or false if the attribute is not set.\n */\n get label() {\n return this.getAttribute('label') || false;\n }\n\n /**\n * Sets the custom error display attribute for an element.\n * @param {boolean} value If true, adds the 'custom-error-display' attribute to the element. If false, removes the attribute from the element.\n */\n set customErrorDisplay(value) {\n if (value) {\n this.setAttribute('custom-error-display', '');\n } else {\n this.removeAttribute('custom-error-display');\n }\n }\n\n /**\n * Getter for the customErrorDisplay attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get customErrorDisplay() {\n return this.hasAttribute('custom-error-display');\n }\n\n /**\n * Sets the `validateOnChange` property. If set to a truthy value, it adds the\n * `validate-on-change` attribute to the element. If set to a falsy value, it\n * removes the `validate-on-change` attribute from the element.\n * @param {boolean} value Determines whether to add or remove the\n * `validate-on-change` attribute. A truthy value adds the attribute, whereas a\n * falsy value removes it.\n */\n set validateOnChange(value) {\n if (value) {\n this.setAttribute('validate-on-change', '');\n } else {\n this.removeAttribute('validate-on-change');\n }\n }\n\n /**\n * Getter for the validateOnChange attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get validateOnChange() {\n return this.hasAttribute('validate-on-change');\n }\n\n /**\n * @summary Getter for the defaultValue attribute.\n * This method retrieves the 'value' attribute of the custom input element.\n * The 'value' attribute represents the default value of the input element.\n * If the 'value' attribute is not set, it returns an empty string.\n * @returns {string} The default value of the input element.\n */\n get defaultValue() {\n return this.getAttribute('value') ?? '';\n }\n\n /**\n * @summary Setter for the defaultValue attribute.\n * This method sets the 'value' attribute of the custom input element to the provided value.\n * The 'value' attribute represents the default value of the input element.\n * @param {string} value The value to set as the default value.\n */\n set defaultValue(value) {\n this.setAttribute('value', value);\n }\n\n /**\n * Sets or removes the 'clearable' attribute on the element.\n * When set to a truthy value, the 'clearable' attribute is added; when falsy, the attribute is removed.\n * @param {boolean} value Determines whether to set or remove the 'clearable' attribute. If true, the 'clearable' attribute is added. If false, it is removed.\n */\n set clearable(value) {\n if (value) {\n this.setAttribute('clearable', '');\n } else {\n this.removeAttribute('clearable');\n }\n }\n\n /**\n * Checks if the 'clearable' attribute is present on the element.\n * @returns {boolean} True if the 'clearable' attribute is set, otherwise false.\n */\n get clearable() {\n return this.hasAttribute('clearable');\n }\n\n /**\n * Sets the placeholder value for an element. If the provided value is non-empty,\n * it assigns the value to the \"placeholder\" attribute. Otherwise, it removes\n * the \"placeholder\" attribute from the element.\n * @param {string} value The placeholder text to set or null/undefined to remove the attribute.\n */\n set placeholder(value) {\n if (value) {\n this.setAttribute('placeholder', value);\n } else {\n this.removeAttribute('placeholder');\n }\n }\n\n /**\n * Retrieves the value of the 'placeholder' attribute from the element.\n * If the attribute is not set, it returns an empty string.\n * @returns {string} The value of the 'placeholder' attribute or an empty string if not set.\n */\n get placeholder() {\n return this.getAttribute('placeholder') || '';\n }\n\n /**\n * Sets the `variant` attribute on the element. If a value is provided, it will set the attribute to the given value.\n * If no value is provided, it removes the `variant` attribute from the element.\n * @param {string} value The value to set for the `variant` attribute. If falsy, the attribute is removed.\n */\n set variant(value) {\n if (value) {\n this.setAttribute('variant', value);\n } else {\n this.removeAttribute('variant');\n }\n }\n\n /**\n * Retrieves the value of the 'variant' attribute from the element.\n * If the attribute is not set, it defaults to 'default'.\n * @returns {string} The value of the 'variant' attribute or 'default' if not set.\n */\n get variant() {\n return this.getAttribute('variant') || 'default';\n }\n\n /**\n * The class name of the input element.\n * @type {string}\n */\n className = 'Input';\n\n /**\n * Getter for the cssStyleSheet attribute.\n * @returns {CSSStyleSheet} The CSS style sheet of the input element.\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Getter for the observedAttributes attribute of the input element.\n * @returns {Array} The attributes to observe for changes.\n */\n static get observedAttributes() {\n return ['value', 'name', 'disabled', 'placeholder', 'label', 'message', 'error-inline'];\n }\n\n /**\n * Sets up the attributes for the input.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n // if some value was set via value setter then dont use default value\n if (this.pristine) {\n this.value = this.defaultValue;\n this.pristine = false;\n }\n }\n\n /**\n * Draws the input element.\n * @returns {DocumentFragment} The drawn input.\n */\n draw() {\n let hasSlotStart = this.hasSlot(this, 'start');\n let hasSlotEnd = this.hasSlot(this, 'end');\n let hasSlotError = this.hasSlot(this, 'error');\n let fragment = document.createDocumentFragment();\n\n // Wrapper\n let native = document.createElement('div');\n native.setAttribute('part', 'native');\n native.classList.add('native-input', this.variant);\n\n if (this.invalid) native.classList.add('has-error');\n\n let wrapper = document.createElement('div');\n wrapper.classList.add('wrapper');\n\n let inputWrapper = document.createElement('div');\n inputWrapper.setAttribute('part', 'wrapper');\n inputWrapper.classList.add('input-wrapper');\n\n // Label\n let label = document.createElement('label');\n label.setAttribute('part', 'label');\n label.innerText = this.label;\n if (this.value && !this.hasAttribute('error')) label.classList.add('fade');\n\n // Input\n let input = document.createElement('input');\n input.setAttribute('type', 'text');\n input.setAttribute('part', 'input');\n input.setAttribute('value', this.value || '');\n input.classList.add('form-control');\n\n const attributes = Array.from(this.attributes).map((attr) => attr.name);\n\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n input.setAttribute(attr, this[attr] || '');\n }\n });\n\n // Error\n let errorSlot = document.createElement('slot');\n errorSlot.setAttribute('name', 'error');\n\n let error = document.createElement('div');\n error.setAttribute('part', 'error');\n error.setAttribute('slot', 'error');\n\n let start = null;\n if (hasSlotStart) {\n start = document.createElement('slot');\n start.setAttribute('name', 'start');\n start.setAttribute('part', 'start');\n }\n\n let end = null;\n if (hasSlotEnd) {\n end = document.createElement('slot');\n end.setAttribute('name', 'end');\n end.setAttribute('part', 'end');\n }\n\n if (hasSlotStart) {\n wrapper.appendChild(start); // zmenene\n native.classList.add('has-start');\n }\n\n if (this.label) {\n if (this.variant === 'standard') {\n native.append(label);\n } else {\n inputWrapper.appendChild(label);\n }\n }\n\n inputWrapper.appendChild(input);\n wrapper.appendChild(inputWrapper);\n\n native.appendChild(wrapper);\n native.append(errorSlot);\n\n this.append(error);\n\n if (this.clearable) {\n this.clear = document.createElement('wje-button');\n this.clear.classList.add('clear');\n this.clear.setAttribute('fill', 'link');\n this.clear.setAttribute('part', 'clear');\n\n let clearIcon = document.createElement('wje-icon');\n clearIcon.setAttribute('name', 'x');\n this.clear.appendChild(clearIcon);\n inputWrapper.appendChild(this.clear);\n }\n\n if (hasSlotEnd) {\n wrapper.appendChild(end);// zmenene\n native.classList.add('has-end');\n }\n\n fragment.appendChild(native);\n\n this.native = native;\n this.labelElement = label;\n this.input = input;\n this.errorMessage = error;\n\n return fragment;\n }\n\n /**\n * Runs after the input is drawn to the DOM.\n */\n afterDraw() {\n this.input.addEventListener('focus', (e) => {\n this.labelElement.classList.add('fade');\n this.native.classList.add('focused');\n });\n\n this.input.addEventListener('blur', (e) => {\n this.native.classList.remove('focused');\n if (!e.target.value) this.labelElement.classList.remove('fade');\n });\n\n this.input.addEventListener('input', (e) => {\n this.validate();\n\n if (this.validateOnChange) {\n this.pristine = false;\n this.propagateValidation();\n }\n\n this.input.classList.remove('pristine');\n this.labelElement.classList.add('fade');\n\n // const clone = new e.constructor(e.type, e);\n // this.dispatchEvent(clone);\n\n event.dispatchCustomEvent(this, 'wje-input:input', {\n value: this.input.value,\n });\n\n this.value = this.input.value;\n });\n\n this.addEventListener('wje-input:invalid', (e) => {\n this.invalid = true;\n this.pristine = false;\n\n this.showInvalidMessage();\n\n if (this.customErrorDisplay) {\n e.preventDefault();\n }\n });\n\n this.addEventListener('focus', () => this.input.focus());\n\n if (this.clear) {\n this.clear.addEventListener('wje-button:click', (e) => {\n this.input.value = '';\n event.dispatchCustomEvent(this.clear, 'wje-input:clear');\n });\n }\n\n this.validate();\n\n if (this.invalid) {\n this.showInvalidMessage();\n }\n\n }\n\n /**\n * Checks whether the input has a slot.\n * @param {HTMLElement} el The element to check.\n * @param {string} slotName The name of the slot to check for.\n * @returns {boolean} Whether the input has the slot.\n */\n hasSlot(el, slotName = null) {\n let selector = slotName ? `[slot=\"${slotName}\"]` : '[slot]';\n\n return el.querySelectorAll(selector).length > 0 ? true : false;\n }\n}\n","import Input from './input.element.js';\n\nexport default Input;\n\nInput.define('wje-input', Input);\n"],"names":[],"mappings":";;;;;;AA8Be,MAAM,cAAc,sBAAsB;AAAA;AAAA;AAAA;AAAA,EAIrD,cAAc;AACV,UAAO;AAoLX;AAAA;AAAA;AAAA;AAAA,qCAAY;AAlLR,SAAK,UAAU;AACf,SAAK,WAAW;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,MAAM,OAAO;AACb,SAAK,UAAU,aAAa,KAAK;AAEjC,QAAI,KAAK,MAAO,MAAK,MAAM,QAAQ;AAEnC,SAAK,WAAW;AAChB,SAAK,SAAS;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,IAAI,QAAQ;;AACR,aAAO,UAAK,UAAL,mBAAY,UAAS,KAAK,UAAU;AAAA,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;AAAA,IAC1E,CAAS;AAED,SAAK,MAAM,iBAAiB,SAAS,CAAC,MAAM;AACxC,WAAK,SAAU;AAEf,UAAI,KAAK,kBAAkB;AACvB,aAAK,WAAW;AAChB,aAAK,oBAAqB;AAAA,MAC1C;AAEY,WAAK,MAAM,UAAU,OAAO,UAAU;AACtC,WAAK,aAAa,UAAU,IAAI,MAAM;AAKtC,YAAM,oBAAoB,MAAM,mBAAmB;AAAA,QAC/C,OAAO,KAAK,MAAM;AAAA,MAClC,CAAa;AAED,WAAK,QAAQ,KAAK,MAAM;AAAA,IACpC,CAAS;AAED,SAAK,iBAAiB,qBAAqB,CAAC,MAAM;AAC9C,WAAK,UAAU;AACf,WAAK,WAAW;AAEhB,WAAK,mBAAoB;AAEzB,UAAI,KAAK,oBAAoB;AACzB,UAAE,eAAgB;AAAA,MAClC;AAAA,IACA,CAAS;AAED,SAAK,iBAAiB,SAAS,MAAM,KAAK,MAAM,OAAO;AAEvD,QAAI,KAAK,OAAO;AACZ,WAAK,MAAM,iBAAiB,oBAAoB,CAAC,MAAM;AACnD,aAAK,MAAM,QAAQ;AACnB,cAAM,oBAAoB,KAAK,OAAO,iBAAiB;AAAA,MACvE,CAAa;AAAA,IACb;AAEQ,SAAK,SAAU;AAEf,QAAI,KAAK,SAAS;AACd,WAAK,mBAAoB;AAAA,IACrC;AAAA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,QAAQ,IAAI,WAAW,MAAM;AACzB,QAAI,WAAW,WAAW,UAAU,QAAQ,OAAO;AAEnD,WAAO,GAAG,iBAAiB,QAAQ,EAAE,SAAS,IAAI,OAAO;AAAA,EACjE;AACA;AC9aA,MAAM,OAAO,aAAa,KAAK;"}
1
+ {"version":3,"file":"wje-input.js","sources":["../packages/wje-input/input.element.js","../packages/wje-input/input.js"],"sourcesContent":["import { FormAssociatedElement } from '../internals/form-associated-element.js';\nimport { event } from '../utils/event.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * @summary This class represents a custom input element. It extends the WJElement class and provides additional functionality for handling input.\n * @documentation https://elements.webjet.sk/components/input\n * @status stable\n * @augments {FormAssociatedElement}\n * @csspart native - The native part.\n * @csspart wrapper - The wrapper part.\n * @csspart input - The input part.\n * @csspart clear - The clear part.\n * @slot start - Slot for content at the start of the input.\n * @slot end - Slot for content at the end of the input.\n * @cssproperty [--wje-input-font-family=var(--wje-font-family)] - Defines the font family for the input text.\n * @cssproperty [--wje-input-background-color=var(--wje-background)] - Specifies the background color of the input field.\n * @cssproperty [--wje-input-color=var(--wje-color)] - Sets the text color within the input field.\n * @cssproperty [--wje-input-color-invalid=var(--wje-color-danger)] - Changes the text color when the input value is invalid.\n * @cssproperty [--wje-input-border-color=var(--wje-border-color)] - Defines the border color of the input field.\n * @cssproperty [--wje-input-border-color-focus=var(--wje-color-primary)] - Specifies the border color when the input is focused.\n * @cssproperty [--wje-input-border-width=1px] - Sets the width of the input border.\n * @cssproperty [--wje-input-border-style=solid] - Defines the border style of the input (e.g., solid, dashed).\n * @cssproperty [--wje-input-border-radius=4px] - Specifies the border radius, creating rounded corners.\n * @cssproperty [--wje-input-margin-bottom=.5rem] - Adds spacing below the input field.\n * @cssproperty [--wje-input-line-height=20px] - Sets the line height of the text within the input field.\n * @cssproperty [--wje-input-slot-padding-inline=.5rem] - Controls the padding on the left and right of the input slot content.\n * // @fires wje-input:input - Dispatched when the input value changes.\n * // @fires wje-input:clear - Dispatched when the input is cleared.\n */\nexport default class Input extends FormAssociatedElement {\n /**\n * Creates an instance of Input.\n */\n constructor() {\n super();\n\n this.invalid = false;\n this.pristine = true;\n }\n\n /**\n * Setter for the value attribute.\n * @param {string} value The value to set.\n */\n set value(value) {\n this.internals.setFormValue(value);\n\n if (this.input) this.input.value = value;\n\n this.pristine = false;\n this._value = value;\n }\n\n /**\n * Retrieves the value from the input element if available; otherwise,\n * returns the internal _value property or an empty string as the default.\n * @returns {string} The current value from the input element, the internal _value, or an empty string.\n */\n get value() {\n return this.input?.value ?? this._value ?? '';\n }\n\n /**\n * Sets the label attribute of the element.\n * @param {string} value The value to set as the label attribute.\n */\n set label(value) {\n this.setAttribute('label', value);\n }\n\n /**\n * Retrieves the value of the 'label' attribute if it exists.\n * If the 'label' attribute is not set, it returns false.\n * @returns {string|boolean} The value of the 'label' attribute as a string, or false if the attribute is not set.\n */\n get label() {\n return this.getAttribute('label') || false;\n }\n\n /**\n * Sets the custom error display attribute for an element.\n * @param {boolean} value If true, adds the 'custom-error-display' attribute to the element. If false, removes the attribute from the element.\n */\n set customErrorDisplay(value) {\n if (value) {\n this.setAttribute('custom-error-display', '');\n } else {\n this.removeAttribute('custom-error-display');\n }\n }\n\n /**\n * Getter for the customErrorDisplay attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get customErrorDisplay() {\n return this.hasAttribute('custom-error-display');\n }\n\n /**\n * Sets the `validateOnChange` property. If set to a truthy value, it adds the\n * `validate-on-change` attribute to the element. If set to a falsy value, it\n * removes the `validate-on-change` attribute from the element.\n * @param {boolean} value Determines whether to add or remove the\n * `validate-on-change` attribute. A truthy value adds the attribute, whereas a\n * falsy value removes it.\n */\n set validateOnChange(value) {\n if (value) {\n this.setAttribute('validate-on-change', '');\n } else {\n this.removeAttribute('validate-on-change');\n }\n }\n\n /**\n * Getter for the validateOnChange attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get validateOnChange() {\n return this.hasAttribute('validate-on-change');\n }\n\n /**\n * @summary Getter for the defaultValue attribute.\n * This method retrieves the 'value' attribute of the custom input element.\n * The 'value' attribute represents the default value of the input element.\n * If the 'value' attribute is not set, it returns an empty string.\n * @returns {string} The default value of the input element.\n */\n get defaultValue() {\n return this.getAttribute('value') ?? '';\n }\n\n /**\n * @summary Setter for the defaultValue attribute.\n * This method sets the 'value' attribute of the custom input element to the provided value.\n * The 'value' attribute represents the default value of the input element.\n * @param {string} value The value to set as the default value.\n */\n set defaultValue(value) {\n this.setAttribute('value', value);\n }\n\n /**\n * Sets or removes the 'clearable' attribute on the element.\n * When set to a truthy value, the 'clearable' attribute is added; when falsy, the attribute is removed.\n * @param {boolean} value Determines whether to set or remove the 'clearable' attribute. If true, the 'clearable' attribute is added. If false, it is removed.\n */\n set clearable(value) {\n if (value) {\n this.setAttribute('clearable', '');\n } else {\n this.removeAttribute('clearable');\n }\n }\n\n /**\n * Checks if the 'clearable' attribute is present on the element.\n * @returns {boolean} True if the 'clearable' attribute is set, otherwise false.\n */\n get clearable() {\n return this.hasAttribute('clearable');\n }\n\n /**\n * Sets the placeholder value for an element. If the provided value is non-empty,\n * it assigns the value to the \"placeholder\" attribute. Otherwise, it removes\n * the \"placeholder\" attribute from the element.\n * @param {string} value The placeholder text to set or null/undefined to remove the attribute.\n */\n set placeholder(value) {\n if (value) {\n this.setAttribute('placeholder', value);\n } else {\n this.removeAttribute('placeholder');\n }\n }\n\n /**\n * Retrieves the value of the 'placeholder' attribute from the element.\n * If the attribute is not set, it returns an empty string.\n * @returns {string} The value of the 'placeholder' attribute or an empty string if not set.\n */\n get placeholder() {\n return this.getAttribute('placeholder') || '';\n }\n\n /**\n * Sets the `variant` attribute on the element. If a value is provided, it will set the attribute to the given value.\n * If no value is provided, it removes the `variant` attribute from the element.\n * @param {string} value The value to set for the `variant` attribute. If falsy, the attribute is removed.\n */\n set variant(value) {\n if (value) {\n this.setAttribute('variant', value);\n } else {\n this.removeAttribute('variant');\n }\n }\n\n /**\n * Retrieves the value of the 'variant' attribute from the element.\n * If the attribute is not set, it defaults to 'default'.\n * @returns {string} The value of the 'variant' attribute or 'default' if not set.\n */\n get variant() {\n return this.getAttribute('variant') || 'default';\n }\n\n /**\n * The class name of the input element.\n * @type {string}\n */\n className = 'Input';\n\n /**\n * Getter for the cssStyleSheet attribute.\n * @returns {CSSStyleSheet} The CSS style sheet of the input element.\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Getter for the observedAttributes attribute of the input element.\n * @returns {Array} The attributes to observe for changes.\n */\n static get observedAttributes() {\n return ['value', 'name', 'disabled', 'placeholder', 'label', 'message', 'error-inline'];\n }\n\n /**\n * Sets up the attributes for the input.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n // if some value was set via value setter then dont use default value\n if (this.pristine) {\n this.value = this.defaultValue;\n this.pristine = false;\n }\n }\n\n /**\n * Draws the input element.\n * @returns {DocumentFragment} The drawn input.\n */\n draw() {\n let hasSlotStart = this.hasSlot(this, 'start');\n let hasSlotEnd = this.hasSlot(this, 'end');\n let hasSlotError = this.hasSlot(this, 'error');\n let fragment = document.createDocumentFragment();\n\n // Wrapper\n let native = document.createElement('div');\n native.setAttribute('part', 'native');\n native.classList.add('native-input', this.variant);\n\n if (this.invalid) native.classList.add('has-error');\n\n let wrapper = document.createElement('div');\n wrapper.classList.add('wrapper');\n\n let inputWrapper = document.createElement('div');\n inputWrapper.setAttribute('part', 'wrapper');\n inputWrapper.classList.add('input-wrapper');\n\n // Label\n let label = document.createElement('label');\n label.setAttribute('part', 'label');\n label.innerText = this.label;\n if (this.value && !this.hasAttribute('error')) label.classList.add('fade');\n\n // Input\n let input = document.createElement('input');\n input.setAttribute('type', 'text');\n input.setAttribute('part', 'input');\n input.setAttribute('value', this.value || '');\n input.classList.add('form-control');\n\n const attributes = Array.from(this.attributes).map((attr) => attr.name);\n\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n input.setAttribute(attr, this[attr] || '');\n }\n });\n\n // Error\n let errorSlot = document.createElement('slot');\n errorSlot.setAttribute('name', 'error');\n errorSlot.setAttribute('part', 'error-slot');\n\n let error = document.createElement('div');\n error.setAttribute('slot', 'error');\n\n let start = null;\n if (hasSlotStart) {\n start = document.createElement('slot');\n start.setAttribute('name', 'start');\n start.setAttribute('part', 'start');\n }\n\n let end = null;\n if (hasSlotEnd) {\n end = document.createElement('slot');\n end.setAttribute('name', 'end');\n end.setAttribute('part', 'end');\n }\n\n if (hasSlotStart) {\n wrapper.appendChild(start); // zmenene\n native.classList.add('has-start');\n }\n\n if (this.label) {\n if (this.variant === 'standard') {\n native.append(label);\n } else {\n inputWrapper.appendChild(label);\n }\n }\n\n inputWrapper.appendChild(input);\n wrapper.appendChild(inputWrapper);\n\n native.appendChild(wrapper);\n native.append(errorSlot);\n\n this.append(error);\n\n if (this.clearable) {\n this.clear = document.createElement('wje-button');\n this.clear.classList.add('clear');\n this.clear.setAttribute('fill', 'link');\n this.clear.setAttribute('part', 'clear');\n\n let clearIcon = document.createElement('wje-icon');\n clearIcon.setAttribute('name', 'x');\n this.clear.appendChild(clearIcon);\n inputWrapper.appendChild(this.clear);\n }\n\n if (hasSlotEnd) {\n wrapper.appendChild(end);// zmenene\n native.classList.add('has-end');\n }\n\n fragment.appendChild(native);\n\n this.native = native;\n this.labelElement = label;\n this.input = input;\n this.errorMessage = error;\n\n return fragment;\n }\n\n /**\n * Runs after the input is drawn to the DOM.\n */\n afterDraw() {\n this.input.addEventListener('focus', (e) => {\n this.labelElement.classList.add('fade');\n this.native.classList.add('focused');\n });\n\n this.input.addEventListener('blur', (e) => {\n this.native.classList.remove('focused');\n if (!e.target.value) this.labelElement.classList.remove('fade');\n });\n\n this.input.addEventListener('input', (e) => {\n this.validate();\n\n if (this.validateOnChange) {\n this.pristine = false;\n this.propagateValidation();\n }\n\n this.input.classList.remove('pristine');\n this.labelElement.classList.add('fade');\n\n // const clone = new e.constructor(e.type, e);\n // this.dispatchEvent(clone);\n\n event.dispatchCustomEvent(this, 'wje-input:input', {\n value: this.input.value,\n });\n\n this.value = this.input.value;\n });\n\n this.addEventListener('wje-input:invalid', (e) => {\n this.invalid = true;\n this.pristine = false;\n\n this.showInvalidMessage();\n\n if (this.customErrorDisplay) {\n e.preventDefault();\n }\n });\n\n this.addEventListener('focus', () => this.input.focus());\n\n if (this.clear) {\n this.clear.addEventListener('wje-button:click', (e) => {\n this.input.value = '';\n event.dispatchCustomEvent(this.clear, 'wje-input:clear');\n });\n }\n\n this.validate();\n\n if (this.invalid) {\n this.showInvalidMessage();\n }\n\n }\n\n /**\n * Checks whether the input has a slot.\n * @param {HTMLElement} el The element to check.\n * @param {string} slotName The name of the slot to check for.\n * @returns {boolean} Whether the input has the slot.\n */\n hasSlot(el, slotName = null) {\n let selector = slotName ? `[slot=\"${slotName}\"]` : '[slot]';\n\n return el.querySelectorAll(selector).length > 0 ? true : false;\n }\n}\n","import Input from './input.element.js';\n\nexport default Input;\n\nInput.define('wje-input', Input);\n"],"names":[],"mappings":";;;;;;AA8Be,MAAM,cAAc,sBAAsB;AAAA;AAAA;AAAA;AAAA,EAIrD,cAAc;AACV,UAAO;AAoLX;AAAA;AAAA;AAAA;AAAA,qCAAY;AAlLR,SAAK,UAAU;AACf,SAAK,WAAW;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,MAAM,OAAO;AACb,SAAK,UAAU,aAAa,KAAK;AAEjC,QAAI,KAAK,MAAO,MAAK,MAAM,QAAQ;AAEnC,SAAK,WAAW;AAChB,SAAK,SAAS;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,IAAI,QAAQ;;AACR,aAAO,UAAK,UAAL,mBAAY,UAAS,KAAK,UAAU;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,MAAM,OAAO;AACb,SAAK,aAAa,SAAS,KAAK;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,IAAI,QAAQ;AACR,WAAO,KAAK,aAAa,OAAO,KAAK;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,mBAAmB,OAAO;AAC1B,QAAI,OAAO;AACP,WAAK,aAAa,wBAAwB,EAAE;AAAA,IACxD,OAAe;AACH,WAAK,gBAAgB,sBAAsB;AAAA,IACvD;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,qBAAqB;AACrB,WAAO,KAAK,aAAa,sBAAsB;AAAA,EACvD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA,IACA,CAAS;AAED,SAAK,iBAAiB,SAAS,MAAM,KAAK,MAAM,OAAO;AAEvD,QAAI,KAAK,OAAO;AACZ,WAAK,MAAM,iBAAiB,oBAAoB,CAAC,MAAM;AACnD,aAAK,MAAM,QAAQ;AACnB,cAAM,oBAAoB,KAAK,OAAO,iBAAiB;AAAA,MACvE,CAAa;AAAA,IACb;AAEQ,SAAK,SAAU;AAEf,QAAI,KAAK,SAAS;AACd,WAAK,mBAAoB;AAAA,IACrC;AAAA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,QAAQ,IAAI,WAAW,MAAM;AACzB,QAAI,WAAW,WAAW,UAAU,QAAQ,OAAO;AAEnD,WAAO,GAAG,iBAAiB,QAAQ,EAAE,SAAS,IAAI,OAAO;AAAA,EACjE;AACA;AC9aA,MAAM,OAAO,aAAa,KAAK;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
4
- "version": "0.1.226",
4
+ "version": "0.1.227",
5
5
  "homepage": "https://github.com/lencys/wj-elements",
6
6
  "author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
7
7
  "license": "MIT",