@descope/web-components-ui 2.1.18 → 2.2.1
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/cjs/index.cjs.js +290 -255
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8084 -8026
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1899.js +1 -1
- package/dist/umd/1899.js.map +1 -1
- package/dist/umd/4623.js +1 -1
- package/dist/umd/4623.js.map +1 -1
- package/dist/umd/4914.js +1 -1
- package/dist/umd/4914.js.map +1 -1
- package/dist/umd/5648.js +1 -1
- package/dist/umd/5648.js.map +1 -1
- package/dist/umd/9582.js +2 -0
- package/dist/umd/9582.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-apps-list.js +1 -1
- package/dist/umd/descope-apps-list.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-enriched-text.js +1 -1
- package/dist/umd/descope-enriched-text.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +28 -28
- package/src/components/boolean-fields/commonStyles.js +11 -1
- package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +32 -4
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +15 -2
- package/src/components/boolean-fields/descope-checkbox/index.js +1 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +5 -2
- package/src/components/boolean-fields/descope-switch-toggle/index.js +1 -0
package/dist/umd/1899.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see 1899.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1899],{18330:(t,e,o)=>{o.d(e,{f:()=>a});var r=o(44099);class a extends r.r{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},27136:(t,e,o)=>{o.d(e,{A:()=>p}),o(86689);var r=o(13256),a=o(82901),i=o(90676),n=o(81488),s=o(86314),l=o(87550),d=o(18330),u=o(37436),h=o(37720);const c=t=>class extends((0,u.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new d.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new h.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",s.k,{moduleId:"vaadin-text-field-styles"});class p extends(c((0,l.cp)((0,i.q)(r.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return r.qy`
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1899,4838],{18330:(t,e,o)=>{o.d(e,{f:()=>a});var r=o(44099);class a extends r.r{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},27136:(t,e,o)=>{o.d(e,{A:()=>p}),o(86689);var r=o(13256),a=o(82901),i=o(90676),n=o(81488),s=o(86314),l=o(87550),d=o(18330),u=o(37436),h=o(37720);const c=t=>class extends((0,u.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new d.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new h.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",s.k,{moduleId:"vaadin-text-field-styles"});class p extends(c((0,l.cp)((0,i.q)(r.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return r.qy`
|
|
3
3
|
<style>
|
|
4
4
|
[part='input-field'] {
|
|
5
5
|
flex-grow: 0;
|
package/dist/umd/1899.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1899.js","mappings":";yKAUO,MAAMA,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,mJCfK,MAAMC,EAAkBC,GAC7B,eAAkC,OAAgBA,IAChD,qBAAWC,GACT,MAAO,CAILC,UAAW,CACTT,KAAMU,QAMRC,UAAW,CACTX,KAAMU,QAORE,QAAS,CACPZ,KAAMa,QAGZ,CAEA,wBAAWC,GACT,MAAO,IAAIlB,MAAMkB,cAAe,YAAa,YAAa,UAC5D,CAEA,sBAAWC,GACT,MAAO,IAAInB,MAAMmB,YAAa,YAAa,YAAa,UAC1D,CAEA,WAAAtB,GACEG,QACAO,KAAKa,SAAS,OAChB,CAGA,gBAAIC,GACF,OAAOd,KAAKe,EAAEC,WAChB,CAGA,KAAAC,GACExB,MAAMwB,QAENjB,KAAKkB,cACH,IAAI,IAAgBlB,KAAOmB,IACzBnB,KAAKoB,iBAAiBD,GACtBnB,KAAKqB,iBAAiBF,GACtBnB,KAAKsB,YAAcH,EACnBnB,KAAKuB,WAAaJ,KAGtBnB,KAAKkB,cAAc,IAAI,IAAwBlB,KAAKwB,aAAcxB,KAAKyB,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAEC,SAAU,6BAuE3D,MAAMC,UAAkBxB,GAAe,SAAc,OAAa,SACvE,aAAWyB,GACT,MAAO,mBACT,CAEA,mBAAWC,GACT,OAAO,IAAI;;;;;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QAAS,IACnB,CAGA,KAAA3G,GACExB,MAAMwB,QAIDjB,KAAK6H,aAAa,SACrB7H,KAAKF,aAAa,OAAQ,SAE9B,CAiBA,UAAAgI,CAAW3E,GACT1D,MAAMqI,WAAW3E,GAEbA,EAAM4E,QAAU5E,EAAM6E,UAAY7E,EAAM8E,SAAW9E,EAAM+E,SAIzDlI,KAAK4H,YAAYO,SAAShF,EAAMiF,OAClCjF,EAAMgE,iBAINnH,KAAKqI,QAET,ICzEJ,QAAe,gBAAiBZ,EAAc,CAAE/F,SAAU,yBAqC1D,MAAM4G,UAAeZ,GAAY,QAAa,SAAc,OAAgB,UAC1E,aAAW9F,GACT,MAAO,eACT,CAEA,mBAAWC,GACT,OAAsB,IFYkB;;;;;;;;;;;;;CEX1C,CAGA,KAAAZ,GACExB,MAAMwB,QAENjB,KAAK8B,mBAAqB,IAAI,IAAkB9B,MAChDA,KAAKkB,cAAclB,KAAK8B,mBAC1B,GAGF,OAAoBwG,E,6FC9DpB,MAAMC,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAE7G,SAAU,e","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/theme/lumo/vaadin-password-field-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/theme/lumo/vaadin-password-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/src/vaadin-password-field-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/src/vaadin-password-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { button } from '@vaadin/button/theme/lumo/vaadin-button-styles.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst passwordFieldButton = css`\n :host {\n position: absolute;\n right: 0;\n top: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n min-width: auto;\n background: transparent;\n outline: none;\n }\n`;\n\nregisterStyles('vaadin-password-field-button', [button, passwordFieldButton], {\n moduleId: 'lumo-password-field-button',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/vaadin-lumo-styles/font-icons.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst passwordField = css`\n [part='reveal-button']::before {\n content: var(--lumo-icons-eye);\n }\n\n :host([password-visible]) [part='reveal-button']::before {\n content: var(--lumo-icons-eye-disabled);\n }\n\n /* Make it easy to hide the button across the whole app */\n [part='reveal-button'] {\n position: relative;\n display: var(--lumo-password-field-reveal-button-display, block);\n }\n\n [part='reveal-button'][hidden] {\n display: none !important;\n }\n`;\n\nregisterStyles('vaadin-password-field', [inputFieldShared, passwordField], { moduleId: 'lumo-password-field' });\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html } from '@polymer/polymer/polymer-element.js';\nimport { Button } from '@vaadin/button/src/vaadin-button.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\n\n/**\n * An element used internally by `<vaadin-password-field>`. Not intended to be used separately.\n *\n * @customElement\n * @extends Button\n * @private\n */\nclass PasswordFieldButton extends Button {\n static get is() {\n return 'vaadin-password-field-button';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n <slot name=\"tooltip\"></slot>\n `;\n }\n}\n\ndefineCustomElement(PasswordFieldButton);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-password-field-button.js';\nimport { html } from '@polymer/polymer/lib/utils/html-tag.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\n\nconst ownTemplate = html`\n <div part=\"reveal-button\" slot=\"suffix\">\n <slot name=\"reveal\"></slot>\n </div>\n`;\n\nlet memoizedTemplate;\n\n/**\n * `<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n *\n * ```html\n * <vaadin-password-field label=\"Password\"></vaadin-password-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-password-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ----------------|----------------------------------------------------\n * `reveal-button` | The eye icon which toggles the password visibility\n *\n * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n *\n * Attribute | Description\n * -------------------|---------------------------------\n * `password-visible` | Set when the password is visible\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends TextField\n */\nexport class PasswordField extends TextField {\n static get is() {\n return 'vaadin-password-field';\n }\n\n static get template() {\n if (!memoizedTemplate) {\n // Clone the superclass template\n memoizedTemplate = super.template.cloneNode(true);\n\n // Retrieve this element's dom-module template\n const revealButton = ownTemplate.content.querySelector('[part=\"reveal-button\"]');\n\n // Append reveal-button and styles to the text-field template\n const inputField = memoizedTemplate.content.querySelector('[part=\"input-field\"]');\n inputField.appendChild(revealButton);\n }\n\n return memoizedTemplate;\n }\n\n static get properties() {\n return {\n /**\n * Set to true to hide the eye icon which toggles the password visibility.\n * @attr {boolean} reveal-button-hidden\n */\n revealButtonHidden: {\n type: Boolean,\n observer: '_revealButtonHiddenChanged',\n value: false,\n },\n\n /**\n * True if the password is visible ([type=text]).\n * @attr {boolean} password-visible\n */\n passwordVisible: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_passwordVisibleChanged',\n readOnly: true,\n },\n\n /**\n * An object with translated strings used for localization.\n * It has the following structure and default values:\n *\n * ```\n * {\n * // Translation of the reveal icon button accessible label\n * reveal: 'Show password'\n * }\n * ```\n */\n i18n: {\n type: Object,\n value: () => {\n return {\n reveal: 'Show password',\n };\n },\n },\n };\n }\n\n static get observers() {\n return ['__i18nChanged(i18n.*)'];\n }\n\n constructor() {\n super();\n this._setType('password');\n this.__boundRevealButtonClick = this._onRevealButtonClick.bind(this);\n this.__boundRevealButtonMouseDown = this._onRevealButtonMouseDown.bind(this);\n this.__lastChange = '';\n }\n\n /** @protected */\n get slotStyles() {\n const tag = this.localName;\n return [\n ...super.slotStyles,\n `\n ${tag} [slot=\"input\"]::-ms-reveal {\n display: none;\n }\n `,\n ];\n }\n\n /** @protected */\n get _revealNode() {\n return this._revealButtonController && this._revealButtonController.node;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._revealPart = this.shadowRoot.querySelector('[part=\"reveal-button\"]');\n\n this._revealButtonController = new SlotController(this, 'reveal', 'vaadin-password-field-button', {\n initializer: (btn) => {\n btn.disabled = this.disabled;\n\n btn.addEventListener('click', this.__boundRevealButtonClick);\n btn.addEventListener('mousedown', this.__boundRevealButtonMouseDown);\n },\n });\n this.addController(this._revealButtonController);\n\n this.__updateAriaLabel(this.i18n);\n\n this._updateToggleState(false);\n this._toggleRevealHidden(this.revealButtonHidden);\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n\n /**\n * Override an event listener inherited from `InputControlMixin`\n * to store the value at the moment of the native `change` event.\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n super._onChange(event);\n\n this.__lastChange = this.inputElement.value;\n }\n\n /**\n * Override method inherited from `FocusMixin` to mark field as focused\n * when focus moves to the reveal button using Shift Tab.\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(event) {\n return event.target === this.inputElement || event.target === this._revealNode;\n }\n\n /**\n * Override method inherited from `FocusMixin` to not hide password\n * when focus moves to the reveal button or back to the input.\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(event) {\n return !(\n event.relatedTarget === this._revealNode ||\n (event.relatedTarget === this.inputElement && event.target === this._revealNode)\n );\n }\n\n /**\n * Override method inherited from `FocusMixin` to toggle password visibility.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n if (!focused) {\n this._setPasswordVisible(false);\n\n // Detect if `focusout` was prevented and if so, dispatch `change` event manually.\n if (this.__lastChange !== this.inputElement.value) {\n this.__lastChange = this.inputElement.value;\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }));\n }\n } else {\n const isButtonFocused = this.getRootNode().activeElement === this._revealNode;\n // Remove focus-ring from the field when the reveal button gets focused\n this.toggleAttribute('focus-ring', this._keyboardActive && !isButtonFocused);\n }\n }\n\n /** @private */\n __updateAriaLabel(i18n) {\n if (i18n.reveal && this._revealNode) {\n this._revealNode.setAttribute('aria-label', i18n.reveal);\n }\n }\n\n /** @private */\n __i18nChanged(i18n) {\n this.__updateAriaLabel(i18n.base);\n }\n\n /** @private */\n _revealButtonHiddenChanged(hidden) {\n this._toggleRevealHidden(hidden);\n }\n\n /** @private */\n _togglePasswordVisibility() {\n this._setPasswordVisible(!this.passwordVisible);\n }\n\n /** @private */\n _onRevealButtonClick() {\n this._togglePasswordVisibility();\n }\n\n /** @private */\n _onRevealButtonMouseDown(e) {\n // Cancel the following focusout event\n e.preventDefault();\n\n // Focus the input to avoid problem with password still visible\n // when user clicks the reveal button and then clicks outside.\n this.inputElement.focus();\n }\n\n /** @private */\n _toggleRevealHidden(hidden) {\n if (this._revealNode) {\n if (hidden) {\n this._revealPart.setAttribute('hidden', '');\n this._revealNode.setAttribute('tabindex', '-1');\n this._revealNode.setAttribute('aria-hidden', 'true');\n } else {\n this._revealPart.removeAttribute('hidden');\n this._revealNode.setAttribute('tabindex', '0');\n this._revealNode.removeAttribute('aria-hidden');\n }\n }\n }\n\n /** @private */\n _updateToggleState(passwordVisible) {\n if (this._revealNode) {\n this._revealNode.setAttribute('aria-pressed', passwordVisible ? 'true' : 'false');\n }\n }\n\n /** @private */\n _passwordVisibleChanged(passwordVisible) {\n this._setType(passwordVisible ? 'text' : 'password');\n\n this._updateToggleState(passwordVisible);\n }\n\n /**\n * Override method inherited from `DisabledMixin` to synchronize the reveal button\n * disabled state with the password field disabled state.\n * @param {boolean} disabled\n * @param {boolean} oldDisabled\n * @protected\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (this._revealNode) {\n this._revealNode.disabled = disabled;\n }\n }\n}\n\ndefineCustomElement(PasswordField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n"],"names":["InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","TextFieldMixin","superClass","properties","maxlength","Number","minlength","pattern","String","delegateAttrs","constraints","_setType","clearElement","$","clearButton","ready","addController","input","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","moduleId","TextField","is","template","_tooltipController","setPosition","setAriaTarget","InputFieldMixin","superclass","autocomplete","autocorrect","autocapitalize","reflectToAttribute","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","passwordFieldButton","passwordField","PasswordFieldButton","ownTemplate","memoizedTemplate","PasswordField","cloneNode","revealButton","content","querySelector","appendChild","revealButtonHidden","Boolean","observer","passwordVisible","readOnly","i18n","Object","reveal","observers","__boundRevealButtonClick","_onRevealButtonClick","bind","__boundRevealButtonMouseDown","_onRevealButtonMouseDown","__lastChange","slotStyles","tag","_revealNode","_revealButtonController","_revealPart","shadowRoot","btn","disabled","addEventListener","__updateAriaLabel","_updateToggleState","_toggleRevealHidden","_onChange","_shouldSetFocus","target","_shouldRemoveFocus","relatedTarget","isButtonFocused","getRootNode","activeElement","toggleAttribute","_keyboardActive","_setPasswordVisible","dispatchEvent","CustomEvent","bubbles","__i18nChanged","base","_revealButtonHiddenChanged","hidden","_togglePasswordVisibility","e","preventDefault","focus","removeAttribute","_passwordVisibleChanged","_disabledChanged","oldDisabled","buttonStyles","ButtonMixin","tabindex","_activeKeys","hasAttribute","_onKeyDown","altKey","shiftKey","ctrlKey","metaKey","includes","key","click","Button","button"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"1899.js","mappings":";8KAUO,MAAMA,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,mJCfK,MAAMC,EAAkBC,GAC7B,eAAkC,OAAgBA,IAChD,qBAAWC,GACT,MAAO,CAILC,UAAW,CACTT,KAAMU,QAMRC,UAAW,CACTX,KAAMU,QAORE,QAAS,CACPZ,KAAMa,QAGZ,CAEA,wBAAWC,GACT,MAAO,IAAIlB,MAAMkB,cAAe,YAAa,YAAa,UAC5D,CAEA,sBAAWC,GACT,MAAO,IAAInB,MAAMmB,YAAa,YAAa,YAAa,UAC1D,CAEA,WAAAtB,GACEG,QACAO,KAAKa,SAAS,OAChB,CAGA,gBAAIC,GACF,OAAOd,KAAKe,EAAEC,WAChB,CAGA,KAAAC,GACExB,MAAMwB,QAENjB,KAAKkB,cACH,IAAI,IAAgBlB,KAAOmB,IACzBnB,KAAKoB,iBAAiBD,GACtBnB,KAAKqB,iBAAiBF,GACtBnB,KAAKsB,YAAcH,EACnBnB,KAAKuB,WAAaJ,KAGtBnB,KAAKkB,cAAc,IAAI,IAAwBlB,KAAKwB,aAAcxB,KAAKyB,kBACzE,IC5DJ,QAAe,o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QAAY,QAAc,OAAWA,MAClE,qBAAWC,GACT,MAAO,CAOLsH,SAAU,CACR9H,KAAMU,OACNX,MAAO,EACP0C,oBAAoB,GAG1B,CAUA,eAAIsF,GACF,MAAO,CAAC,QAAS,IACnB,CAGA,KAAA3G,GACExB,MAAMwB,QAIDjB,KAAK6H,aAAa,SACrB7H,KAAKF,aAAa,OAAQ,SAE9B,CAiBA,UAAAgI,CAAW3E,GACT1D,MAAMqI,WAAW3E,GAEbA,EAAM4E,QAAU5E,EAAM6E,UAAY7E,EAAM8E,SAAW9E,EAAM+E,SAIzDlI,KAAK4H,YAAYO,SAAShF,EAAMiF,OAClCjF,EAAMgE,iBAINnH,KAAKqI,QAET,ICzEJ,QAAe,gBAAiBZ,EAAc,CAAE/F,SAAU,yBAqC1D,MAAM4G,UAAeZ,GAAY,QAAa,SAAc,OAAgB,UAC1E,aAAW9F,GACT,MAAO,eACT,CAEA,mBAAWC,GACT,OAAsB,IFYkB;;;;;;;;;;;;;CEX1C,CAGA,KAAAZ,GACExB,MAAMwB,QAENjB,KAAK8B,mBAAqB,IAAI,IAAkB9B,MAChDA,KAAKkB,cAAclB,KAAK8B,mBAC1B,GAGF,OAAoBwG,E,6FC9DpB,MAAMC,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAE7G,SAAU,e","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/theme/lumo/vaadin-password-field-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/theme/lumo/vaadin-password-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/src/vaadin-password-field-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/password-field/src/vaadin-password-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { button } from '@vaadin/button/theme/lumo/vaadin-button-styles.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst passwordFieldButton = css`\n :host {\n position: absolute;\n right: 0;\n top: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n min-width: auto;\n background: transparent;\n outline: none;\n }\n`;\n\nregisterStyles('vaadin-password-field-button', [button, passwordFieldButton], {\n moduleId: 'lumo-password-field-button',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/vaadin-lumo-styles/font-icons.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst passwordField = css`\n [part='reveal-button']::before {\n content: var(--lumo-icons-eye);\n }\n\n :host([password-visible]) [part='reveal-button']::before {\n content: var(--lumo-icons-eye-disabled);\n }\n\n /* Make it easy to hide the button across the whole app */\n [part='reveal-button'] {\n position: relative;\n display: var(--lumo-password-field-reveal-button-display, block);\n }\n\n [part='reveal-button'][hidden] {\n display: none !important;\n }\n`;\n\nregisterStyles('vaadin-password-field', [inputFieldShared, passwordField], { moduleId: 'lumo-password-field' });\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html } from '@polymer/polymer/polymer-element.js';\nimport { Button } from '@vaadin/button/src/vaadin-button.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\n\n/**\n * An element used internally by `<vaadin-password-field>`. Not intended to be used separately.\n *\n * @customElement\n * @extends Button\n * @private\n */\nclass PasswordFieldButton extends Button {\n static get is() {\n return 'vaadin-password-field-button';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n <slot name=\"tooltip\"></slot>\n `;\n }\n}\n\ndefineCustomElement(PasswordFieldButton);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-password-field-button.js';\nimport { html } from '@polymer/polymer/lib/utils/html-tag.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\n\nconst ownTemplate = html`\n <div part=\"reveal-button\" slot=\"suffix\">\n <slot name=\"reveal\"></slot>\n </div>\n`;\n\nlet memoizedTemplate;\n\n/**\n * `<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n *\n * ```html\n * <vaadin-password-field label=\"Password\"></vaadin-password-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-password-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ----------------|----------------------------------------------------\n * `reveal-button` | The eye icon which toggles the password visibility\n *\n * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n *\n * Attribute | Description\n * -------------------|---------------------------------\n * `password-visible` | Set when the password is visible\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends TextField\n */\nexport class PasswordField extends TextField {\n static get is() {\n return 'vaadin-password-field';\n }\n\n static get template() {\n if (!memoizedTemplate) {\n // Clone the superclass template\n memoizedTemplate = super.template.cloneNode(true);\n\n // Retrieve this element's dom-module template\n const revealButton = ownTemplate.content.querySelector('[part=\"reveal-button\"]');\n\n // Append reveal-button and styles to the text-field template\n const inputField = memoizedTemplate.content.querySelector('[part=\"input-field\"]');\n inputField.appendChild(revealButton);\n }\n\n return memoizedTemplate;\n }\n\n static get properties() {\n return {\n /**\n * Set to true to hide the eye icon which toggles the password visibility.\n * @attr {boolean} reveal-button-hidden\n */\n revealButtonHidden: {\n type: Boolean,\n observer: '_revealButtonHiddenChanged',\n value: false,\n },\n\n /**\n * True if the password is visible ([type=text]).\n * @attr {boolean} password-visible\n */\n passwordVisible: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_passwordVisibleChanged',\n readOnly: true,\n },\n\n /**\n * An object with translated strings used for localization.\n * It has the following structure and default values:\n *\n * ```\n * {\n * // Translation of the reveal icon button accessible label\n * reveal: 'Show password'\n * }\n * ```\n */\n i18n: {\n type: Object,\n value: () => {\n return {\n reveal: 'Show password',\n };\n },\n },\n };\n }\n\n static get observers() {\n return ['__i18nChanged(i18n.*)'];\n }\n\n constructor() {\n super();\n this._setType('password');\n this.__boundRevealButtonClick = this._onRevealButtonClick.bind(this);\n this.__boundRevealButtonMouseDown = this._onRevealButtonMouseDown.bind(this);\n this.__lastChange = '';\n }\n\n /** @protected */\n get slotStyles() {\n const tag = this.localName;\n return [\n ...super.slotStyles,\n `\n ${tag} [slot=\"input\"]::-ms-reveal {\n display: none;\n }\n `,\n ];\n }\n\n /** @protected */\n get _revealNode() {\n return this._revealButtonController && this._revealButtonController.node;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._revealPart = this.shadowRoot.querySelector('[part=\"reveal-button\"]');\n\n this._revealButtonController = new SlotController(this, 'reveal', 'vaadin-password-field-button', {\n initializer: (btn) => {\n btn.disabled = this.disabled;\n\n btn.addEventListener('click', this.__boundRevealButtonClick);\n btn.addEventListener('mousedown', this.__boundRevealButtonMouseDown);\n },\n });\n this.addController(this._revealButtonController);\n\n this.__updateAriaLabel(this.i18n);\n\n this._updateToggleState(false);\n this._toggleRevealHidden(this.revealButtonHidden);\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n\n /**\n * Override an event listener inherited from `InputControlMixin`\n * to store the value at the moment of the native `change` event.\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n super._onChange(event);\n\n this.__lastChange = this.inputElement.value;\n }\n\n /**\n * Override method inherited from `FocusMixin` to mark field as focused\n * when focus moves to the reveal button using Shift Tab.\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(event) {\n return event.target === this.inputElement || event.target === this._revealNode;\n }\n\n /**\n * Override method inherited from `FocusMixin` to not hide password\n * when focus moves to the reveal button or back to the input.\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(event) {\n return !(\n event.relatedTarget === this._revealNode ||\n (event.relatedTarget === this.inputElement && event.target === this._revealNode)\n );\n }\n\n /**\n * Override method inherited from `FocusMixin` to toggle password visibility.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n if (!focused) {\n this._setPasswordVisible(false);\n\n // Detect if `focusout` was prevented and if so, dispatch `change` event manually.\n if (this.__lastChange !== this.inputElement.value) {\n this.__lastChange = this.inputElement.value;\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }));\n }\n } else {\n const isButtonFocused = this.getRootNode().activeElement === this._revealNode;\n // Remove focus-ring from the field when the reveal button gets focused\n this.toggleAttribute('focus-ring', this._keyboardActive && !isButtonFocused);\n }\n }\n\n /** @private */\n __updateAriaLabel(i18n) {\n if (i18n.reveal && this._revealNode) {\n this._revealNode.setAttribute('aria-label', i18n.reveal);\n }\n }\n\n /** @private */\n __i18nChanged(i18n) {\n this.__updateAriaLabel(i18n.base);\n }\n\n /** @private */\n _revealButtonHiddenChanged(hidden) {\n this._toggleRevealHidden(hidden);\n }\n\n /** @private */\n _togglePasswordVisibility() {\n this._setPasswordVisible(!this.passwordVisible);\n }\n\n /** @private */\n _onRevealButtonClick() {\n this._togglePasswordVisibility();\n }\n\n /** @private */\n _onRevealButtonMouseDown(e) {\n // Cancel the following focusout event\n e.preventDefault();\n\n // Focus the input to avoid problem with password still visible\n // when user clicks the reveal button and then clicks outside.\n this.inputElement.focus();\n }\n\n /** @private */\n _toggleRevealHidden(hidden) {\n if (this._revealNode) {\n if (hidden) {\n this._revealPart.setAttribute('hidden', '');\n this._revealNode.setAttribute('tabindex', '-1');\n this._revealNode.setAttribute('aria-hidden', 'true');\n } else {\n this._revealPart.removeAttribute('hidden');\n this._revealNode.setAttribute('tabindex', '0');\n this._revealNode.removeAttribute('aria-hidden');\n }\n }\n }\n\n /** @private */\n _updateToggleState(passwordVisible) {\n if (this._revealNode) {\n this._revealNode.setAttribute('aria-pressed', passwordVisible ? 'true' : 'false');\n }\n }\n\n /** @private */\n _passwordVisibleChanged(passwordVisible) {\n this._setType(passwordVisible ? 'text' : 'password');\n\n this._updateToggleState(passwordVisible);\n }\n\n /**\n * Override method inherited from `DisabledMixin` to synchronize the reveal button\n * disabled state with the password field disabled state.\n * @param {boolean} disabled\n * @param {boolean} oldDisabled\n * @protected\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (this._revealNode) {\n this._revealNode.disabled = disabled;\n }\n }\n}\n\ndefineCustomElement(PasswordField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n"],"names":["InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","TextFieldMixin","superClass","properties","maxlength","Number","minlength","pattern","String","delegateAttrs","constraints","_setType","clearElement","$","clearButton","ready","addController","input","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","moduleId","TextField","is","template","_tooltipController","setPosition","setAriaTarget","InputFieldMixin","superclass","autocomplete","autocorrect","autocapitalize","reflectToAttribute","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","passwordFieldButton","passwordField","PasswordFieldButton","ownTemplate","memoizedTemplate","PasswordField","cloneNode","revealButton","content","querySelector","appendChild","revealButtonHidden","Boolean","observer","passwordVisible","readOnly","i18n","Object","reveal","observers","__boundRevealButtonClick","_onRevealButtonClick","bind","__boundRevealButtonMouseDown","_onRevealButtonMouseDown","__lastChange","slotStyles","tag","_revealNode","_revealButtonController","_revealPart","shadowRoot","btn","disabled","addEventListener","__updateAriaLabel","_updateToggleState","_toggleRevealHidden","_onChange","_shouldSetFocus","target","_shouldRemoveFocus","relatedTarget","isButtonFocused","getRootNode","activeElement","toggleAttribute","_keyboardActive","_setPasswordVisible","dispatchEvent","CustomEvent","bubbles","__i18nChanged","base","_revealButtonHiddenChanged","hidden","_togglePasswordVisibility","e","preventDefault","focus","removeAttribute","_passwordVisibleChanged","_disabledChanged","oldDisabled","buttonStyles","ButtonMixin","tabindex","_activeKeys","hasAttribute","_onKeyDown","altKey","shiftKey","ctrlKey","metaKey","includes","key","click","Button","button"],"sourceRoot":""}
|
package/dist/umd/4623.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see 4623.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4623],{18330:(t,e,o)=>{o.d(e,{f:()=>i});var a=o(44099);class i extends a.r{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},29828:(t,e,o)=>{o.d(e,{f:()=>n});var a=o(98741),i=o(5745),r=(o(30025),o(88057)),s=o(33637);const n=(0,a.y)(t=>class extends((0,r.q)((0,i.i)((0,s.g)(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){const e=t.target;this._toggleChecked(e.checked)}_toggleChecked(t){this.checked=t}})},54623:(t,e,o)=>{o(64511),o(42068),o(9433),o(3241),o(83315);var a=o(87550);(0,a.SF)("vaadin-radio-button",a.AH`
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4623,4838],{18330:(t,e,o)=>{o.d(e,{f:()=>i});var a=o(44099);class i extends a.r{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},29828:(t,e,o)=>{o.d(e,{f:()=>n});var a=o(98741),i=o(5745),r=(o(30025),o(88057)),s=o(33637);const n=(0,a.y)(t=>class extends((0,r.q)((0,i.i)((0,s.g)(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){const e=t.target;this._toggleChecked(e.checked)}_toggleChecked(t){this.checked=t}})},54623:(t,e,o)=>{o(64511),o(42068),o(9433),o(3241),o(83315);var a=o(87550);(0,a.SF)("vaadin-radio-button",a.AH`
|
|
3
3
|
:host {
|
|
4
4
|
color: var(--vaadin-radio-button-label-color, var(--lumo-body-text-color));
|
|
5
5
|
font-size: var(--vaadin-radio-button-label-font-size, var(--lumo-font-size-m));
|
package/dist/umd/4623.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4623.js","mappings":";yKAUO,MAAMA,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,6FCXK,MAAMC,GAAe,OACzBC,GACC,eAAgC,QAAmB,QAAc,OAAWA,MAC1E,qBAAWC,GACT,MAAO,CAKLC,QAAS,CACPT,KAAMU,QACNX,OAAO,EACPY,QAAQ,EACRC,oBAAoB,GAG1B,CAEA,wBAAWC,GACT,MAAO,IAAIjB,MAAMiB,cAAe,UAClC,CAOA,SAAAC,CAAUC,GACR,MAAMC,EAAQD,EAAME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5H,MAAM2H,YAAYC,IAIbA,GAAWC,SAASC,YACvBvH,KAAK6G,UAET,CAMA,mBAAAV,CAAoBvC,GAEhB5D,KAAKJ,MADHgE,EACWA,EAAYhE,MAEZ,GAGfI,KAAKoD,eAAeoB,QAASgD,IAC3BA,EAAOlH,QAAUkH,IAAW5D,IAG1B5D,KAAKwC,UACPxC,KAAK+G,sCAET,CAQA,oCAAAA,GACE/G,KAAKoD,eAAeoB,QAASgD,IACvBxH,KAAKwC,SAGPgF,EAAOzB,SAAWyB,IAAWxH,KAAK0D,sBAElC8D,EAAOzB,SAAW/F,KAAK+F,UAG7B,GC/ZS0B,EAAmB,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCMnC,QAAe,qBAAsBA,EAAkB,CAAEzG,SAAU,8BAkDnE,MAAM0G,UAAmBpF,GAAgB,QAAa,QAAc,SAClE,aAAWJ,GACT,MAAO,oBACT,CAEA,mBAAWC,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;KAsBb,GAGF,OAAoBuF,E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/checked-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/theme/lumo/vaadin-radio-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/theme/lumo/vaadin-radio-group-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';\nimport { InputMixin } from './input-mixin.js';\n\n/**\n * A mixin to manage the checked state.\n *\n * @polymerMixin\n * @mixes DelegateStateMixin\n * @mixes DisabledMixin\n * @mixes InputMixin\n */\nexport const CheckedMixin = dedupingMixin(\n (superclass) =>\n class CheckedMixinClass extends DelegateStateMixin(DisabledMixin(InputMixin(superclass))) {\n static get properties() {\n return {\n /**\n * True if the element is checked.\n * @type {boolean}\n */\n checked: {\n type: Boolean,\n value: false,\n notify: true,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateProps() {\n return [...super.delegateProps, 'checked'];\n }\n\n /**\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n const input = event.target;\n\n this._toggleChecked(input.checked);\n }\n\n /** @protected */\n _toggleChecked(checked) {\n this.checked = checked;\n }\n },\n);\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-radio-button',\n css`\n :host {\n color: var(--vaadin-radio-button-label-color, var(--lumo-body-text-color));\n font-size: var(--vaadin-radio-button-label-font-size, var(--lumo-font-size-m));\n font-family: var(--lumo-font-family);\n line-height: var(--lumo-line-height-s);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: default;\n outline: none;\n --_radio-button-size: var(--vaadin-radio-button-size, calc(var(--lumo-size-m) / 2));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));\n }\n\n :host([has-label]) ::slotted(label) {\n padding: var(\n --vaadin-radio-button-label-padding,\n var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs)\n );\n }\n\n [part='radio'] {\n width: var(--_radio-button-size);\n height: var(--_radio-button-size);\n margin: var(--lumo-space-xs);\n position: relative;\n border-radius: 50%;\n background: var(--vaadin-radio-button-background, var(--lumo-contrast-20pct));\n transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;\n will-change: transform;\n cursor: var(--lumo-clickable-cursor);\n /* Default field border color */\n --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));\n }\n\n /* Used for activation \"halo\" */\n [part='radio']::before {\n pointer-events: none;\n color: transparent;\n width: 100%;\n height: 100%;\n line-height: var(--_radio-button-size);\n border-radius: inherit;\n background-color: inherit;\n transform: scale(1.4);\n opacity: 0;\n transition: transform 0.1s, opacity 0.8s;\n will-change: transform, opacity;\n }\n\n /* Used for the dot */\n [part='radio']::after {\n content: '';\n pointer-events: none;\n width: 0;\n height: 0;\n border: var(--vaadin-radio-button-dot-size, 3px) solid\n var(--vaadin-radio-button-dot-color, var(--lumo-primary-contrast-color));\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: 0.25s transform;\n will-change: transform;\n background-clip: content-box;\n }\n\n :host([checked]) {\n --vaadin-input-field-border-color: transparent;\n }\n\n :host([checked]) [part='radio'] {\n background-color: var(--_selection-color);\n }\n\n :host([checked]) [part='radio']::after {\n transform: translate(-50%, -50%) scale(1);\n }\n\n :host(:not([checked]):not([disabled]):hover) [part='radio'] {\n background: var(--vaadin-radio-button-background-hover, var(--lumo-contrast-30pct));\n }\n\n :host([active]) [part='radio'] {\n transform: scale(0.9);\n transition-duration: 0.05s;\n }\n\n :host([active][checked]) [part='radio'] {\n transform: scale(1.1);\n }\n\n :host([active]:not([checked])) [part='radio']::before {\n transition-duration: 0.01s, 0.01s;\n transform: scale(0);\n opacity: 0.4;\n }\n\n :host([focus-ring]) [part='radio'] {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color),\n inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);\n }\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n --vaadin-input-field-border-color: var(--lumo-contrast-20pct);\n }\n\n :host([disabled]) ::slotted(label) {\n color: inherit;\n }\n\n :host([disabled]) [part='radio'] {\n background-color: var(--lumo-contrast-10pct);\n }\n\n :host([disabled]) [part='radio']::after {\n border-color: var(--lumo-contrast-30pct);\n }\n\n /* RTL specific styles */\n :host([dir='rtl'][has-label]) ::slotted(label) {\n padding: var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-s);\n }\n `,\n { moduleId: 'lumo-radio-button' },\n);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';\nimport { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { LabelMixin } from '@vaadin/field-base/src/label-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common radio-button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes CheckedMixin\n * @mixes DelegateFocusMixin\n * @mixes LabelMixin\n */\nexport const RadioButtonMixin = (superclass) =>\n class RadioButtonMixinClass extends LabelMixin(CheckedMixin(DelegateFocusMixin(ActiveMixin(superclass)))) {\n static get properties() {\n return {\n /**\n * The name of the radio button.\n *\n * @type {string}\n */\n name: {\n type: String,\n value: '',\n },\n\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /** @override */\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'name'];\n }\n\n constructor() {\n super();\n\n this._setType('radio');\n\n // Set the string \"on\" as the default value for the radio button following the HTML specification:\n // https://html.spec.whatwg.org/multipage/input.html#dom-input-value-default-on\n this.value = 'on';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const radioButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host([disabled]) {\n -webkit-tap-highlight-color: transparent;\n }\n\n .vaadin-radio-button-container {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: baseline;\n }\n\n [part='radio'],\n ::slotted(input),\n ::slotted(label) {\n grid-row: 1;\n }\n\n [part='radio'],\n ::slotted(input) {\n grid-column: 1;\n }\n\n [part='radio'] {\n width: var(--vaadin-radio-button-size, 1em);\n height: var(--vaadin-radio-button-size, 1em);\n --_input-border-width: var(--vaadin-input-field-border-width, 0);\n --_input-border-color: var(--vaadin-input-field-border-color, transparent);\n box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);\n }\n\n [part='radio']::before {\n display: block;\n content: '\\\\202F';\n line-height: var(--vaadin-radio-button-size, 1em);\n contain: paint;\n }\n\n /* visually hidden */\n ::slotted(input) {\n opacity: 0;\n cursor: inherit;\n margin: 0;\n align-self: stretch;\n -webkit-appearance: none;\n width: initial;\n height: initial;\n }\n\n @media (forced-colors: active) {\n [part='radio'] {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) [part='radio'] {\n outline-width: 2px;\n }\n\n :host([disabled]) [part='radio'] {\n outline-color: GrayText;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { RadioButtonMixin } from './vaadin-radio-button-mixin.js';\nimport { radioButtonStyles } from './vaadin-radio-button-styles.js';\n\nregisterStyles('vaadin-radio-button', radioButtonStyles, { moduleId: 'vaadin-radio-button-styles' });\n\n/**\n * `<vaadin-radio-button>` is a web component representing a choice in a radio group.\n * Only one radio button in the group can be selected at the same time.\n *\n * ```html\n * <vaadin-radio-group label=\"Travel class\">\n * <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n * </vaadin-radio-group>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ------------|----------------\n * `radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * -------------|-------------|------------\n * `active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`\n * `disabled` | Set when the radio button is disabled. | `:host`\n * `focus-ring` | Set when the radio button is focused using the keyboard. | `:host`\n * `focused` | Set when the radio button is focused. | `:host`\n * `checked` | Set when the radio button is checked. | `:host`\n * `has-label` | Set when the radio button has a label. | `:host`\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} checked-changed - Fired when the `checked` property changes.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @mixes ElementMixin\n * @mixes RadioButtonMixin\n */\nclass RadioButton extends RadioButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-radio-button';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-radio-button-container\">\n <div part=\"radio\" aria-hidden=\"true\"></div>\n <slot name=\"input\"></slot>\n <slot name=\"label\"></slot>\n </div>\n `;\n }\n}\n\ndefineCustomElement(RadioButton);\n\nexport { RadioButton };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { helper } from '@vaadin/vaadin-lumo-styles/mixins/helper.js';\nimport { requiredField } from '@vaadin/vaadin-lumo-styles/mixins/required-field.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst radioGroup = css`\n :host {\n color: var(--lumo-body-text-color);\n font-size: var(--lumo-font-size-m);\n font-family: var(--lumo-font-family);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n padding: var(--lumo-space-xs) 0;\n }\n\n :host::before {\n /* Effective height of vaadin-radio-button */\n height: var(--lumo-size-s);\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n }\n\n :host([theme~='vertical']) [part='group-field'] {\n flex-direction: column;\n }\n\n :host([disabled]) [part='label'] {\n color: var(--lumo-disabled-text-color);\n -webkit-text-fill-color: var(--lumo-disabled-text-color);\n }\n\n :host([focused]:not([readonly])) [part='label'] {\n color: var(--lumo-primary-text-color);\n }\n\n :host(:hover:not([readonly]):not([focused])) [part='label'],\n :host(:hover:not([readonly])) [part='helper-text'] {\n color: var(--lumo-body-text-color);\n }\n\n /* Touch device adjustment */\n @media (pointer: coarse) {\n :host(:hover:not([readonly]):not([focused])) [part='label'] {\n color: var(--lumo-secondary-text-color);\n }\n }\n`;\n\nregisterStyles('vaadin-radio-group', [requiredField, helper, radioGroup], { moduleId: 'lumo-radio-group' });\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';\nimport { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\nimport { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';\n\n/**\n * A mixin providing common radio-group functionality.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n * @mixes FieldMixin\n * @mixes FocusMixin\n * @mixes KeyboardMixin\n */\nexport const RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends FieldMixin(FocusMixin(DisabledMixin(KeyboardMixin(superclass)))) {\n static get properties() {\n return {\n /**\n * The value of the radio group.\n *\n * @type {string}\n */\n value: {\n type: String,\n notify: true,\n value: '',\n observer: '__valueChanged',\n },\n\n /**\n * When present, the user cannot modify the value of the radio group.\n * The property works similarly to the `disabled` property.\n * While the `disabled` property disables all radio buttons inside the group,\n * the `readonly` property disables only unchecked ones.\n *\n * @type {boolean}\n */\n readonly: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '__readonlyChanged',\n },\n\n /**\n * @type {string}\n * @private\n */\n _fieldName: {\n type: String,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__registerRadioButton = this.__registerRadioButton.bind(this);\n this.__unregisterRadioButton = this.__unregisterRadioButton.bind(this);\n this.__onRadioButtonCheckedChange = this.__onRadioButtonCheckedChange.bind(this);\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.addEventListener('tooltip-changed', (event) => {\n const tooltip = event.detail.node;\n if (tooltip && tooltip.isConnected) {\n // Tooltip element has been added to the DOM\n const inputs = this.__radioButtons.map((radio) => radio.inputElement);\n this._tooltipController.setAriaTarget(inputs);\n } else {\n // Tooltip element is no longer connected\n this._tooltipController.setAriaTarget([]);\n }\n });\n }\n\n /**\n * A collection of the group's radio buttons.\n *\n * @return {!Array<!RadioButton>}\n * @private\n */\n get __radioButtons() {\n return this.__filterRadioButtons([...this.children]);\n }\n\n /**\n * A currently selected radio button.\n *\n * @return {!RadioButton | undefined}\n * @private\n */\n get __selectedRadioButton() {\n return this.__radioButtons.find((radioButton) => radioButton.checked);\n }\n\n /**\n * @return {boolean}\n * @private\n */\n get isHorizontalRTL() {\n return this.__isRTL && this._theme !== 'vertical';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.ariaTarget = this;\n\n // See https://github.com/vaadin/vaadin-web-components/issues/94\n this.setAttribute('role', 'radiogroup');\n\n this._fieldName = `${this.localName}-${generateUniqueId()}`;\n\n const slot = this.shadowRoot.querySelector('slot:not([name])');\n this._observer = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n // Registers the added radio buttons in the reverse order\n // in order for the group to take the value of the most recent button.\n this.__filterRadioButtons(addedNodes).reverse().forEach(this.__registerRadioButton);\n\n // Unregisters the removed radio buttons.\n this.__filterRadioButtons(removedNodes).forEach(this.__unregisterRadioButton);\n\n const inputs = this.__radioButtons.map((radio) => radio.inputElement);\n this._tooltipController.setAriaTarget(inputs);\n });\n\n this.addController(this._tooltipController);\n }\n\n /**\n * @param {!Array<!Node>} nodes\n * @return {!Array<!RadioButton>}\n * @private\n */\n __filterRadioButtons(nodes) {\n return nodes.filter((node) => node.nodeType === Node.ELEMENT_NODE && node.localName === 'vaadin-radio-button');\n }\n\n /**\n * Override method inherited from `KeyboardMixin`\n * to implement the custom keyboard navigation as a replacement for the native one\n * in order for the navigation to work the same way across different browsers.\n *\n * @param {!KeyboardEvent} event\n * @override\n * @protected\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n const radioButton = event\n .composedPath()\n .find((node) => node.nodeType === Node.ELEMENT_NODE && node.localName === 'vaadin-radio-button');\n\n if (['ArrowLeft', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n this.__selectNextRadioButton(radioButton);\n }\n\n if (['ArrowRight', 'ArrowDown'].includes(event.key)) {\n event.preventDefault();\n this.__selectPrevRadioButton(radioButton);\n }\n }\n\n /**\n * Override an observer from `FieldMixin`.\n *\n * @param {boolean} invalid\n * @protected\n * @override\n */\n _invalidChanged(invalid) {\n super._invalidChanged(invalid);\n\n if (invalid) {\n this.setAttribute('aria-invalid', 'true');\n } else {\n this.removeAttribute('aria-invalid');\n }\n }\n\n /**\n * @param {number} index\n * @private\n */\n __selectNextRadioButton(radioButton) {\n const index = this.__radioButtons.indexOf(radioButton);\n\n this.__selectIncRadioButton(index, this.isHorizontalRTL ? 1 : -1);\n }\n\n /**\n * @param {number} index\n * @private\n */\n __selectPrevRadioButton(radioButton) {\n const index = this.__radioButtons.indexOf(radioButton);\n\n this.__selectIncRadioButton(index, this.isHorizontalRTL ? -1 : 1);\n }\n\n /**\n * @param {number} index\n * @param {number} step\n * @private\n */\n __selectIncRadioButton(index, step) {\n const newIndex = (this.__radioButtons.length + index + step) % this.__radioButtons.length;\n const newRadioButton = this.__radioButtons[newIndex];\n\n if (newRadioButton.disabled) {\n this.__selectIncRadioButton(newIndex, step);\n } else {\n newRadioButton.focusElement.focus();\n newRadioButton.focusElement.click();\n }\n }\n\n /**\n * Registers the radio button after adding it to the group.\n *\n * @param {!RadioButton} radioButton\n * @private\n */\n __registerRadioButton(radioButton) {\n radioButton.name = this._fieldName;\n radioButton.addEventListener('checked-changed', this.__onRadioButtonCheckedChange);\n\n if (this.disabled || this.readonly) {\n radioButton.disabled = true;\n }\n\n if (radioButton.checked) {\n this.__selectRadioButton(radioButton);\n }\n }\n\n /**\n * Unregisters the radio button before removing it from the group.\n *\n * @param {!RadioButton} radioButton\n * @private\n */\n __unregisterRadioButton(radioButton) {\n radioButton.removeEventListener('checked-changed', this.__onRadioButtonCheckedChange);\n\n if (radioButton.value === this.value) {\n this.__selectRadioButton(null);\n }\n }\n\n /**\n * @param {!CustomEvent} event\n * @private\n */\n __onRadioButtonCheckedChange(event) {\n if (event.target.checked) {\n this.__selectRadioButton(event.target);\n }\n }\n\n /**\n * Whenever the user sets a non-empty value,\n * the method tries to select the radio button with that value\n * showing a warning if no radio button was found with the given value.\n * If the new value is empty, the method deselects the currently selected radio button.\n * At last, the method toggles the `has-value` attribute considering the new value.\n *\n * @param {string | null | undefined} newValue\n * @param {string | null | undefined} oldValue\n * @private\n */\n __valueChanged(newValue, oldValue) {\n if (oldValue === undefined && newValue === '') {\n return;\n }\n\n if (newValue) {\n const newSelectedRadioButton = this.__radioButtons.find((radioButton) => {\n return radioButton.value === newValue;\n });\n\n if (newSelectedRadioButton) {\n this.__selectRadioButton(newSelectedRadioButton);\n this.toggleAttribute('has-value', true);\n } else {\n console.warn(`The radio button with the value \"${newValue}\" was not found.`);\n }\n } else {\n this.__selectRadioButton(null);\n this.removeAttribute('has-value');\n }\n\n if (oldValue !== undefined) {\n this.validate();\n }\n }\n\n /**\n * Whenever `readonly` property changes on the group element,\n * the method updates the `disabled` property for the radio buttons.\n *\n * @param {boolean} newValue\n * @param {boolean} oldValue\n * @private\n */\n __readonlyChanged(newValue, oldValue) {\n // Prevent updating the `disabled` property for the radio buttons at initialization.\n // Otherwise, the group's radio buttons may end up enabled regardless\n // an intentionally added `disabled` attribute on some of them.\n if (!newValue && oldValue === undefined) {\n return;\n }\n\n if (oldValue !== newValue) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * Override method inherited from `DisabledMixin`\n * to update the `disabled` property for the radio buttons\n * whenever the property changes on the group element.\n *\n * @param {boolean} newValue\n * @param {boolean} oldValue\n * @override\n * @protected\n */\n _disabledChanged(newValue, oldValue) {\n super._disabledChanged(newValue, oldValue);\n\n // Prevent updating the `disabled` property for the radio buttons at initialization.\n // Otherwise, the group's radio buttons may end up enabled regardless\n // an intentionally added `disabled` attribute on some of them.\n if (!newValue && oldValue === undefined) {\n return;\n }\n\n if (oldValue !== newValue) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to prevent removing the `focused` attribute\n * when focus moves between radio buttons inside the group.\n *\n * @param {!FocusEvent} event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(event) {\n return !this.contains(event.relatedTarget);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to run validation when the group loses focus.\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * @param {RadioButton} radioButton\n * @private\n */\n __selectRadioButton(radioButton) {\n if (radioButton) {\n this.value = radioButton.value;\n } else {\n this.value = '';\n }\n\n this.__radioButtons.forEach((button) => {\n button.checked = button === radioButton;\n });\n\n if (this.readonly) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * If the group is read-only, the method disables the unchecked radio buttons.\n * Otherwise, the method propagates the group's `disabled` property to the radio buttons.\n *\n * @private\n */\n __updateRadioButtonsDisabledProperty() {\n this.__radioButtons.forEach((button) => {\n if (this.readonly) {\n // The native radio button doesn't support the `readonly` attribute\n // so the state can be only imitated, by disabling unchecked radio buttons.\n button.disabled = button !== this.__selectedRadioButton;\n } else {\n button.disabled = this.disabled;\n }\n });\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const radioGroupStyles = css`\n :host {\n display: inline-flex;\n }\n\n :host::before {\n content: '\\\\2003';\n width: 0;\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .vaadin-group-field-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n [part='group-field'] {\n display: flex;\n flex-wrap: wrap;\n }\n\n :host(:not([has-label])) [part='label'] {\n display: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-radio-button.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { RadioGroupMixin } from './vaadin-radio-group-mixin.js';\nimport { radioGroupStyles } from './vaadin-radio-group-styles.js';\n\nregisterStyles('vaadin-radio-group', radioGroupStyles, { moduleId: 'vaadin-radio-group-styles' });\n\n/**\n * `<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n *\n * ```html\n * <vaadin-radio-group label=\"Travel class\">\n * <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n * </vaadin-radio-group>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The slotted label element wrapper\n * `group-field` | The radio button elements wrapper\n * `helper-text` | The slotted helper text element wrapper\n * `error-message` | The slotted error message element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------------------------------------|------------\n * `disabled` | Set when the element is disabled | :host\n * `readonly` | Set when the element is readonly | :host\n * `invalid` | Set when the element is invalid | :host\n * `focused` | Set when the element is focused | :host\n * `has-label` | Set when the element has a label | :host\n * `has-value` | Set when the element has a value | :host\n * `has-helper` | Set when the element has helper text | :host\n * `has-error-message` | Set when the element has an error message | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @mixes ElementMixin\n * @mixes RadioGroupMixin\n */\nclass RadioGroup extends RadioGroupMixin(ElementMixin(ThemableMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-radio-group';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-group-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\"></span>\n </div>\n\n <div part=\"group-field\">\n <slot></slot>\n </div>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n}\n\ndefineCustomElement(RadioGroup);\n\nexport { RadioGroup };\n"],"names":["InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","CheckedMixin","superclass","properties","checked","Boolean","notify","reflectToAttribute","delegateProps","_onChange","event","input","target","_toggleChecked","moduleId","RadioButtonMixin","name","String","tabindex","Number","delegateAttrs","_setType","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","radioButtonStyles","RadioButton","is","template","radioGroup","helper","RadioGroupMixin","observer","readonly","_fieldName","__registerRadioButton","bind","__unregisterRadioButton","__onRadioButtonCheckedChange","_tooltipController","addEventListener","tooltip","detail","isConnected","inputs","__radioButtons","map","radio","setAriaTarget","__filterRadioButtons","children","__selectedRadioButton","find","radioButton","isHorizontalRTL","__isRTL","_theme","localName","slot","shadowRoot","querySelector","_observer","addedNodes","removedNodes","reverse","forEach","nodes","filter","nodeType","Node","ELEMENT_NODE","_onKeyDown","composedPath","includes","key","preventDefault","__selectNextRadioButton","__selectPrevRadioButton","_invalidChanged","invalid","removeAttribute","index","indexOf","__selectIncRadioButton","step","newIndex","length","newRadioButton","disabled","focusElement","focus","click","__selectRadioButton","removeEventListener","__valueChanged","newValue","oldValue","undefined","newSelectedRadioButton","toggleAttribute","console","warn","validate","__readonlyChanged","__updateRadioButtonsDisabledProperty","_disabledChanged","_shouldRemoveFocus","contains","relatedTarget","_setFocused","focused","document","hasFocus","button","radioGroupStyles","RadioGroup"],"sourceRoot":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@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/checked-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/theme/lumo/vaadin-radio-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/theme/lumo/vaadin-radio-group-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/radio-group/src/vaadin-radio-group.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';\nimport { InputMixin } from './input-mixin.js';\n\n/**\n * A mixin to manage the checked state.\n *\n * @polymerMixin\n * @mixes DelegateStateMixin\n * @mixes DisabledMixin\n * @mixes InputMixin\n */\nexport const CheckedMixin = dedupingMixin(\n (superclass) =>\n class CheckedMixinClass extends DelegateStateMixin(DisabledMixin(InputMixin(superclass))) {\n static get properties() {\n return {\n /**\n * True if the element is checked.\n * @type {boolean}\n */\n checked: {\n type: Boolean,\n value: false,\n notify: true,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateProps() {\n return [...super.delegateProps, 'checked'];\n }\n\n /**\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n const input = event.target;\n\n this._toggleChecked(input.checked);\n }\n\n /** @protected */\n _toggleChecked(checked) {\n this.checked = checked;\n }\n },\n);\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-radio-button',\n css`\n :host {\n color: var(--vaadin-radio-button-label-color, var(--lumo-body-text-color));\n font-size: var(--vaadin-radio-button-label-font-size, var(--lumo-font-size-m));\n font-family: var(--lumo-font-family);\n line-height: var(--lumo-line-height-s);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: default;\n outline: none;\n --_radio-button-size: var(--vaadin-radio-button-size, calc(var(--lumo-size-m) / 2));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));\n }\n\n :host([has-label]) ::slotted(label) {\n padding: var(\n --vaadin-radio-button-label-padding,\n var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs)\n );\n }\n\n [part='radio'] {\n width: var(--_radio-button-size);\n height: var(--_radio-button-size);\n margin: var(--lumo-space-xs);\n position: relative;\n border-radius: 50%;\n background: var(--vaadin-radio-button-background, var(--lumo-contrast-20pct));\n transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;\n will-change: transform;\n cursor: var(--lumo-clickable-cursor);\n /* Default field border color */\n --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));\n }\n\n /* Used for activation \"halo\" */\n [part='radio']::before {\n pointer-events: none;\n color: transparent;\n width: 100%;\n height: 100%;\n line-height: var(--_radio-button-size);\n border-radius: inherit;\n background-color: inherit;\n transform: scale(1.4);\n opacity: 0;\n transition: transform 0.1s, opacity 0.8s;\n will-change: transform, opacity;\n }\n\n /* Used for the dot */\n [part='radio']::after {\n content: '';\n pointer-events: none;\n width: 0;\n height: 0;\n border: var(--vaadin-radio-button-dot-size, 3px) solid\n var(--vaadin-radio-button-dot-color, var(--lumo-primary-contrast-color));\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: 0.25s transform;\n will-change: transform;\n background-clip: content-box;\n }\n\n :host([checked]) {\n --vaadin-input-field-border-color: transparent;\n }\n\n :host([checked]) [part='radio'] {\n background-color: var(--_selection-color);\n }\n\n :host([checked]) [part='radio']::after {\n transform: translate(-50%, -50%) scale(1);\n }\n\n :host(:not([checked]):not([disabled]):hover) [part='radio'] {\n background: var(--vaadin-radio-button-background-hover, var(--lumo-contrast-30pct));\n }\n\n :host([active]) [part='radio'] {\n transform: scale(0.9);\n transition-duration: 0.05s;\n }\n\n :host([active][checked]) [part='radio'] {\n transform: scale(1.1);\n }\n\n :host([active]:not([checked])) [part='radio']::before {\n transition-duration: 0.01s, 0.01s;\n transform: scale(0);\n opacity: 0.4;\n }\n\n :host([focus-ring]) [part='radio'] {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color),\n inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);\n }\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n --vaadin-input-field-border-color: var(--lumo-contrast-20pct);\n }\n\n :host([disabled]) ::slotted(label) {\n color: inherit;\n }\n\n :host([disabled]) [part='radio'] {\n background-color: var(--lumo-contrast-10pct);\n }\n\n :host([disabled]) [part='radio']::after {\n border-color: var(--lumo-contrast-30pct);\n }\n\n /* RTL specific styles */\n :host([dir='rtl'][has-label]) ::slotted(label) {\n padding: var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-s);\n }\n `,\n { moduleId: 'lumo-radio-button' },\n);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';\nimport { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { LabelMixin } from '@vaadin/field-base/src/label-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common radio-button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes CheckedMixin\n * @mixes DelegateFocusMixin\n * @mixes LabelMixin\n */\nexport const RadioButtonMixin = (superclass) =>\n class RadioButtonMixinClass extends LabelMixin(CheckedMixin(DelegateFocusMixin(ActiveMixin(superclass)))) {\n static get properties() {\n return {\n /**\n * The name of the radio button.\n *\n * @type {string}\n */\n name: {\n type: String,\n value: '',\n },\n\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /** @override */\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'name'];\n }\n\n constructor() {\n super();\n\n this._setType('radio');\n\n // Set the string \"on\" as the default value for the radio button following the HTML specification:\n // https://html.spec.whatwg.org/multipage/input.html#dom-input-value-default-on\n this.value = 'on';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const radioButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host([disabled]) {\n -webkit-tap-highlight-color: transparent;\n }\n\n .vaadin-radio-button-container {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: baseline;\n }\n\n [part='radio'],\n ::slotted(input),\n ::slotted(label) {\n grid-row: 1;\n }\n\n [part='radio'],\n ::slotted(input) {\n grid-column: 1;\n }\n\n [part='radio'] {\n width: var(--vaadin-radio-button-size, 1em);\n height: var(--vaadin-radio-button-size, 1em);\n --_input-border-width: var(--vaadin-input-field-border-width, 0);\n --_input-border-color: var(--vaadin-input-field-border-color, transparent);\n box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);\n }\n\n [part='radio']::before {\n display: block;\n content: '\\\\202F';\n line-height: var(--vaadin-radio-button-size, 1em);\n contain: paint;\n }\n\n /* visually hidden */\n ::slotted(input) {\n opacity: 0;\n cursor: inherit;\n margin: 0;\n align-self: stretch;\n -webkit-appearance: none;\n width: initial;\n height: initial;\n }\n\n @media (forced-colors: active) {\n [part='radio'] {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) [part='radio'] {\n outline-width: 2px;\n }\n\n :host([disabled]) [part='radio'] {\n outline-color: GrayText;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { RadioButtonMixin } from './vaadin-radio-button-mixin.js';\nimport { radioButtonStyles } from './vaadin-radio-button-styles.js';\n\nregisterStyles('vaadin-radio-button', radioButtonStyles, { moduleId: 'vaadin-radio-button-styles' });\n\n/**\n * `<vaadin-radio-button>` is a web component representing a choice in a radio group.\n * Only one radio button in the group can be selected at the same time.\n *\n * ```html\n * <vaadin-radio-group label=\"Travel class\">\n * <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n * </vaadin-radio-group>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ------------|----------------\n * `radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * -------------|-------------|------------\n * `active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`\n * `disabled` | Set when the radio button is disabled. | `:host`\n * `focus-ring` | Set when the radio button is focused using the keyboard. | `:host`\n * `focused` | Set when the radio button is focused. | `:host`\n * `checked` | Set when the radio button is checked. | `:host`\n * `has-label` | Set when the radio button has a label. | `:host`\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} checked-changed - Fired when the `checked` property changes.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @mixes ElementMixin\n * @mixes RadioButtonMixin\n */\nclass RadioButton extends RadioButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-radio-button';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-radio-button-container\">\n <div part=\"radio\" aria-hidden=\"true\"></div>\n <slot name=\"input\"></slot>\n <slot name=\"label\"></slot>\n </div>\n `;\n }\n}\n\ndefineCustomElement(RadioButton);\n\nexport { RadioButton };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { helper } from '@vaadin/vaadin-lumo-styles/mixins/helper.js';\nimport { requiredField } from '@vaadin/vaadin-lumo-styles/mixins/required-field.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst radioGroup = css`\n :host {\n color: var(--lumo-body-text-color);\n font-size: var(--lumo-font-size-m);\n font-family: var(--lumo-font-family);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n padding: var(--lumo-space-xs) 0;\n }\n\n :host::before {\n /* Effective height of vaadin-radio-button */\n height: var(--lumo-size-s);\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n }\n\n :host([theme~='vertical']) [part='group-field'] {\n flex-direction: column;\n }\n\n :host([disabled]) [part='label'] {\n color: var(--lumo-disabled-text-color);\n -webkit-text-fill-color: var(--lumo-disabled-text-color);\n }\n\n :host([focused]:not([readonly])) [part='label'] {\n color: var(--lumo-primary-text-color);\n }\n\n :host(:hover:not([readonly]):not([focused])) [part='label'],\n :host(:hover:not([readonly])) [part='helper-text'] {\n color: var(--lumo-body-text-color);\n }\n\n /* Touch device adjustment */\n @media (pointer: coarse) {\n :host(:hover:not([readonly]):not([focused])) [part='label'] {\n color: var(--lumo-secondary-text-color);\n }\n }\n`;\n\nregisterStyles('vaadin-radio-group', [requiredField, helper, radioGroup], { moduleId: 'lumo-radio-group' });\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';\nimport { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\nimport { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';\n\n/**\n * A mixin providing common radio-group functionality.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n * @mixes FieldMixin\n * @mixes FocusMixin\n * @mixes KeyboardMixin\n */\nexport const RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends FieldMixin(FocusMixin(DisabledMixin(KeyboardMixin(superclass)))) {\n static get properties() {\n return {\n /**\n * The value of the radio group.\n *\n * @type {string}\n */\n value: {\n type: String,\n notify: true,\n value: '',\n observer: '__valueChanged',\n },\n\n /**\n * When present, the user cannot modify the value of the radio group.\n * The property works similarly to the `disabled` property.\n * While the `disabled` property disables all radio buttons inside the group,\n * the `readonly` property disables only unchecked ones.\n *\n * @type {boolean}\n */\n readonly: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '__readonlyChanged',\n },\n\n /**\n * @type {string}\n * @private\n */\n _fieldName: {\n type: String,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__registerRadioButton = this.__registerRadioButton.bind(this);\n this.__unregisterRadioButton = this.__unregisterRadioButton.bind(this);\n this.__onRadioButtonCheckedChange = this.__onRadioButtonCheckedChange.bind(this);\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.addEventListener('tooltip-changed', (event) => {\n const tooltip = event.detail.node;\n if (tooltip && tooltip.isConnected) {\n // Tooltip element has been added to the DOM\n const inputs = this.__radioButtons.map((radio) => radio.inputElement);\n this._tooltipController.setAriaTarget(inputs);\n } else {\n // Tooltip element is no longer connected\n this._tooltipController.setAriaTarget([]);\n }\n });\n }\n\n /**\n * A collection of the group's radio buttons.\n *\n * @return {!Array<!RadioButton>}\n * @private\n */\n get __radioButtons() {\n return this.__filterRadioButtons([...this.children]);\n }\n\n /**\n * A currently selected radio button.\n *\n * @return {!RadioButton | undefined}\n * @private\n */\n get __selectedRadioButton() {\n return this.__radioButtons.find((radioButton) => radioButton.checked);\n }\n\n /**\n * @return {boolean}\n * @private\n */\n get isHorizontalRTL() {\n return this.__isRTL && this._theme !== 'vertical';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.ariaTarget = this;\n\n // See https://github.com/vaadin/vaadin-web-components/issues/94\n this.setAttribute('role', 'radiogroup');\n\n this._fieldName = `${this.localName}-${generateUniqueId()}`;\n\n const slot = this.shadowRoot.querySelector('slot:not([name])');\n this._observer = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n // Registers the added radio buttons in the reverse order\n // in order for the group to take the value of the most recent button.\n this.__filterRadioButtons(addedNodes).reverse().forEach(this.__registerRadioButton);\n\n // Unregisters the removed radio buttons.\n this.__filterRadioButtons(removedNodes).forEach(this.__unregisterRadioButton);\n\n const inputs = this.__radioButtons.map((radio) => radio.inputElement);\n this._tooltipController.setAriaTarget(inputs);\n });\n\n this.addController(this._tooltipController);\n }\n\n /**\n * @param {!Array<!Node>} nodes\n * @return {!Array<!RadioButton>}\n * @private\n */\n __filterRadioButtons(nodes) {\n return nodes.filter((node) => node.nodeType === Node.ELEMENT_NODE && node.localName === 'vaadin-radio-button');\n }\n\n /**\n * Override method inherited from `KeyboardMixin`\n * to implement the custom keyboard navigation as a replacement for the native one\n * in order for the navigation to work the same way across different browsers.\n *\n * @param {!KeyboardEvent} event\n * @override\n * @protected\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n const radioButton = event\n .composedPath()\n .find((node) => node.nodeType === Node.ELEMENT_NODE && node.localName === 'vaadin-radio-button');\n\n if (['ArrowLeft', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n this.__selectNextRadioButton(radioButton);\n }\n\n if (['ArrowRight', 'ArrowDown'].includes(event.key)) {\n event.preventDefault();\n this.__selectPrevRadioButton(radioButton);\n }\n }\n\n /**\n * Override an observer from `FieldMixin`.\n *\n * @param {boolean} invalid\n * @protected\n * @override\n */\n _invalidChanged(invalid) {\n super._invalidChanged(invalid);\n\n if (invalid) {\n this.setAttribute('aria-invalid', 'true');\n } else {\n this.removeAttribute('aria-invalid');\n }\n }\n\n /**\n * @param {number} index\n * @private\n */\n __selectNextRadioButton(radioButton) {\n const index = this.__radioButtons.indexOf(radioButton);\n\n this.__selectIncRadioButton(index, this.isHorizontalRTL ? 1 : -1);\n }\n\n /**\n * @param {number} index\n * @private\n */\n __selectPrevRadioButton(radioButton) {\n const index = this.__radioButtons.indexOf(radioButton);\n\n this.__selectIncRadioButton(index, this.isHorizontalRTL ? -1 : 1);\n }\n\n /**\n * @param {number} index\n * @param {number} step\n * @private\n */\n __selectIncRadioButton(index, step) {\n const newIndex = (this.__radioButtons.length + index + step) % this.__radioButtons.length;\n const newRadioButton = this.__radioButtons[newIndex];\n\n if (newRadioButton.disabled) {\n this.__selectIncRadioButton(newIndex, step);\n } else {\n newRadioButton.focusElement.focus();\n newRadioButton.focusElement.click();\n }\n }\n\n /**\n * Registers the radio button after adding it to the group.\n *\n * @param {!RadioButton} radioButton\n * @private\n */\n __registerRadioButton(radioButton) {\n radioButton.name = this._fieldName;\n radioButton.addEventListener('checked-changed', this.__onRadioButtonCheckedChange);\n\n if (this.disabled || this.readonly) {\n radioButton.disabled = true;\n }\n\n if (radioButton.checked) {\n this.__selectRadioButton(radioButton);\n }\n }\n\n /**\n * Unregisters the radio button before removing it from the group.\n *\n * @param {!RadioButton} radioButton\n * @private\n */\n __unregisterRadioButton(radioButton) {\n radioButton.removeEventListener('checked-changed', this.__onRadioButtonCheckedChange);\n\n if (radioButton.value === this.value) {\n this.__selectRadioButton(null);\n }\n }\n\n /**\n * @param {!CustomEvent} event\n * @private\n */\n __onRadioButtonCheckedChange(event) {\n if (event.target.checked) {\n this.__selectRadioButton(event.target);\n }\n }\n\n /**\n * Whenever the user sets a non-empty value,\n * the method tries to select the radio button with that value\n * showing a warning if no radio button was found with the given value.\n * If the new value is empty, the method deselects the currently selected radio button.\n * At last, the method toggles the `has-value` attribute considering the new value.\n *\n * @param {string | null | undefined} newValue\n * @param {string | null | undefined} oldValue\n * @private\n */\n __valueChanged(newValue, oldValue) {\n if (oldValue === undefined && newValue === '') {\n return;\n }\n\n if (newValue) {\n const newSelectedRadioButton = this.__radioButtons.find((radioButton) => {\n return radioButton.value === newValue;\n });\n\n if (newSelectedRadioButton) {\n this.__selectRadioButton(newSelectedRadioButton);\n this.toggleAttribute('has-value', true);\n } else {\n console.warn(`The radio button with the value \"${newValue}\" was not found.`);\n }\n } else {\n this.__selectRadioButton(null);\n this.removeAttribute('has-value');\n }\n\n if (oldValue !== undefined) {\n this.validate();\n }\n }\n\n /**\n * Whenever `readonly` property changes on the group element,\n * the method updates the `disabled` property for the radio buttons.\n *\n * @param {boolean} newValue\n * @param {boolean} oldValue\n * @private\n */\n __readonlyChanged(newValue, oldValue) {\n // Prevent updating the `disabled` property for the radio buttons at initialization.\n // Otherwise, the group's radio buttons may end up enabled regardless\n // an intentionally added `disabled` attribute on some of them.\n if (!newValue && oldValue === undefined) {\n return;\n }\n\n if (oldValue !== newValue) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * Override method inherited from `DisabledMixin`\n * to update the `disabled` property for the radio buttons\n * whenever the property changes on the group element.\n *\n * @param {boolean} newValue\n * @param {boolean} oldValue\n * @override\n * @protected\n */\n _disabledChanged(newValue, oldValue) {\n super._disabledChanged(newValue, oldValue);\n\n // Prevent updating the `disabled` property for the radio buttons at initialization.\n // Otherwise, the group's radio buttons may end up enabled regardless\n // an intentionally added `disabled` attribute on some of them.\n if (!newValue && oldValue === undefined) {\n return;\n }\n\n if (oldValue !== newValue) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to prevent removing the `focused` attribute\n * when focus moves between radio buttons inside the group.\n *\n * @param {!FocusEvent} event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(event) {\n return !this.contains(event.relatedTarget);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to run validation when the group loses focus.\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * @param {RadioButton} radioButton\n * @private\n */\n __selectRadioButton(radioButton) {\n if (radioButton) {\n this.value = radioButton.value;\n } else {\n this.value = '';\n }\n\n this.__radioButtons.forEach((button) => {\n button.checked = button === radioButton;\n });\n\n if (this.readonly) {\n this.__updateRadioButtonsDisabledProperty();\n }\n }\n\n /**\n * If the group is read-only, the method disables the unchecked radio buttons.\n * Otherwise, the method propagates the group's `disabled` property to the radio buttons.\n *\n * @private\n */\n __updateRadioButtonsDisabledProperty() {\n this.__radioButtons.forEach((button) => {\n if (this.readonly) {\n // The native radio button doesn't support the `readonly` attribute\n // so the state can be only imitated, by disabling unchecked radio buttons.\n button.disabled = button !== this.__selectedRadioButton;\n } else {\n button.disabled = this.disabled;\n }\n });\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const radioGroupStyles = css`\n :host {\n display: inline-flex;\n }\n\n :host::before {\n content: '\\\\2003';\n width: 0;\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .vaadin-group-field-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n [part='group-field'] {\n display: flex;\n flex-wrap: wrap;\n }\n\n :host(:not([has-label])) [part='label'] {\n display: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-radio-button.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { RadioGroupMixin } from './vaadin-radio-group-mixin.js';\nimport { radioGroupStyles } from './vaadin-radio-group-styles.js';\n\nregisterStyles('vaadin-radio-group', radioGroupStyles, { moduleId: 'vaadin-radio-group-styles' });\n\n/**\n * `<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n *\n * ```html\n * <vaadin-radio-group label=\"Travel class\">\n * <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n * <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n * </vaadin-radio-group>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The slotted label element wrapper\n * `group-field` | The radio button elements wrapper\n * `helper-text` | The slotted helper text element wrapper\n * `error-message` | The slotted error message element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------------------------------------|------------\n * `disabled` | Set when the element is disabled | :host\n * `readonly` | Set when the element is readonly | :host\n * `invalid` | Set when the element is invalid | :host\n * `focused` | Set when the element is focused | :host\n * `has-label` | Set when the element has a label | :host\n * `has-value` | Set when the element has a value | :host\n * `has-helper` | Set when the element has helper text | :host\n * `has-error-message` | Set when the element has an error message | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @mixes ElementMixin\n * @mixes RadioGroupMixin\n */\nclass RadioGroup extends RadioGroupMixin(ElementMixin(ThemableMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-radio-group';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-group-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\"></span>\n </div>\n\n <div part=\"group-field\">\n <slot></slot>\n </div>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n}\n\ndefineCustomElement(RadioGroup);\n\nexport { RadioGroup };\n"],"names":["InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","CheckedMixin","superclass","properties","checked","Boolean","notify","reflectToAttribute","delegateProps","_onChange","event","input","target","_toggleChecked","moduleId","RadioButtonMixin","name","String","tabindex","Number","delegateAttrs","_setType","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","radioButtonStyles","RadioButton","is","template","radioGroup","helper","RadioGroupMixin","observer","readonly","_fieldName","__registerRadioButton","bind","__unregisterRadioButton","__onRadioButtonCheckedChange","_tooltipController","addEventListener","tooltip","detail","isConnected","inputs","__radioButtons","map","radio","setAriaTarget","__filterRadioButtons","children","__selectedRadioButton","find","radioButton","isHorizontalRTL","__isRTL","_theme","localName","slot","shadowRoot","querySelector","_observer","addedNodes","removedNodes","reverse","forEach","nodes","filter","nodeType","Node","ELEMENT_NODE","_onKeyDown","composedPath","includes","key","preventDefault","__selectNextRadioButton","__selectPrevRadioButton","_invalidChanged","invalid","removeAttribute","index","indexOf","__selectIncRadioButton","step","newIndex","length","newRadioButton","disabled","focusElement","focus","click","__selectRadioButton","removeEventListener","__valueChanged","newValue","oldValue","undefined","newSelectedRadioButton","toggleAttribute","console","warn","validate","__readonlyChanged","__updateRadioButtonsDisabledProperty","_disabledChanged","_shouldRemoveFocus","contains","relatedTarget","_setFocused","focused","document","hasFocus","button","radioGroupStyles","RadioGroup"],"sourceRoot":""}
|