@descope/web-components-ui 1.77.0 → 1.79.0

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.
Files changed (92) hide show
  1. package/dist/cjs/index.cjs.js +49 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +49 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/2739.js +1 -1
  6. package/dist/umd/2739.js.map +1 -1
  7. package/dist/umd/7092.js +1 -1
  8. package/dist/umd/7092.js.map +1 -1
  9. package/dist/umd/DescopeDev.js +1 -1
  10. package/dist/umd/DescopeDev.js.map +1 -1
  11. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  12. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  13. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  14. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  15. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  16. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  17. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  18. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  19. package/dist/umd/descope-date-field-index-js.js +1 -1
  20. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  21. package/dist/umd/descope-email-field-index-js.js +1 -1
  22. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  23. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  24. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  25. package/dist/umd/descope-grid-index-js.js +1 -1
  26. package/dist/umd/descope-grid-index-js.js.map +1 -1
  27. package/dist/umd/descope-hybrid-field-index-js.js +2 -2
  28. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  29. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  30. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
  31. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  32. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  33. package/dist/umd/descope-new-password-index-js.js +1 -1
  34. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  35. package/dist/umd/descope-number-field-index-js.js +1 -1
  36. package/dist/umd/descope-number-field-index-js.js.map +1 -1
  37. package/dist/umd/descope-passcode-index-js.js +2 -2
  38. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  39. package/dist/umd/descope-password-index-js.js +1 -1
  40. package/dist/umd/descope-password-index-js.js.map +1 -1
  41. package/dist/umd/descope-radio-group-index-js.js +1 -1
  42. package/dist/umd/descope-radio-group-index-js.js.map +1 -1
  43. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  44. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  45. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  46. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
  47. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  48. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  49. package/dist/umd/descope-text-area-index-js.js +1 -1
  50. package/dist/umd/descope-text-area-index-js.js.map +1 -1
  51. package/dist/umd/descope-text-field-index-js.js +2 -2
  52. package/dist/umd/descope-text-field-index-js.js.map +1 -1
  53. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  54. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  55. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  56. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  57. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  58. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  59. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  60. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  61. package/package.json +5 -5
  62. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -0
  63. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -0
  64. package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +1 -0
  65. package/src/components/descope-hybrid-field/HybridFieldClass.js +10 -0
  66. package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +1 -0
  67. package/src/components/descope-new-password/NewPasswordClass.js +1 -0
  68. package/src/components/descope-passcode/PasscodeClass.js +1 -0
  69. package/src/components/descope-password/PasswordClass.js +2 -1
  70. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +4 -0
  71. package/src/components/descope-text-area/TextAreaClass.js +1 -0
  72. package/src/components/descope-text-field/textFieldMappings.js +1 -0
  73. package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +1 -0
  74. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -1
  75. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
  76. package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +1 -0
  77. package/src/theme/components/checkbox.js +1 -0
  78. package/src/theme/components/emailField.js +1 -0
  79. package/src/theme/components/hybridField.js +1 -0
  80. package/src/theme/components/inputWrapper.js +1 -0
  81. package/src/theme/components/multiSelectComboBox.js +1 -0
  82. package/src/theme/components/newPassword.js +1 -0
  83. package/src/theme/components/numberField.js +1 -0
  84. package/src/theme/components/passcode.js +1 -0
  85. package/src/theme/components/password.js +1 -0
  86. package/src/theme/components/phoneField.js +1 -0
  87. package/src/theme/components/phoneInputBoxField.js +1 -0
  88. package/src/theme/components/radioGroup/radioGroup.js +1 -0
  89. package/src/theme/components/samlGroupMappings.js +1 -0
  90. package/src/theme/components/switchToggle.js +1 -0
  91. package/src/theme/components/textArea.js +1 -0
  92. package/src/theme/components/textField.js +1 -0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F,GAC9CvF,GAAOuF,EACThG,KAAKO,YAAY2B,aAAe8D,GACtBA,GAAiBhG,KAAKgC,iBAChChC,KAAKO,YAAYT,MAAQW,EAEzBT,KAAKO,YAAY2B,kBAAekE,CAEpC,CAEA,SAAItG,GACF,OAAOE,KAAKO,YAAY2B,eAAe,YAAclC,KAAKgC,mBACtDhC,KAAKO,YAAY8F,OAAOvG,OACxB,EACN,CAEA,oBAAIkC,GACF,MAAmD,SAA5ChC,KAAKC,aAAa,qBAC3B,CAEA,oBAAIwF,GACF,MAAmD,SAA5CzF,KAAKC,aAAa,qBAC3B,IAiCyB,EAmN3B,QAAY,CACVqG,MAAO,CAAC,GAAI,UACZC,eAAgB,mBAChBC,MAAO,IAAM,2HAMb,QAAuB3M,EAAc6C,qBACrC,QAAwB,6BACxB,QAAsB,6BACtB,QAAiB,u2BAoCf,QAAwB,6BACxB,kBAMF+J,iBAAkB,CAAC,WAAY,OAAQ,OAAQ,WAC/C1N,gBACA2N,oBAAqB,CAAC,QAAS,WAAY,kB","sources":["webpack://@descope/web-components-ui/../components/descope-combo-box/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-combo-box/src/component/ComboBoxClass.js"],"sourcesContent":["import '@vaadin/combo-box';\nimport { componentName, ComboBoxClass } from './ComboBoxClass';\n\ncustomElements.define(componentName, ComboBoxClass);\n\nexport { ComboBoxClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputPlaceholder,\n resetInputReadonlyStyle,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '@descope-ui/common/theme-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n portalMixin,\n proxyInputMixin,\n} from '@descope-ui/common/components-mixins';\n\nexport const componentName = getComponentName('combo-box');\n\nconst ComboBoxMixin = (superclass) =>\n class ComboBoxMixinClass extends superclass {\n static get observedAttributes() {\n return ['label-type'];\n }\n\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ displayName, value, label }) => {\n return `<span data-name=\"${label}\" data-id=\"${value}\">${\n displayName || label\n }</span>`;\n };\n\n #data;\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n get renderItem() {\n return this.#renderItem;\n }\n\n set renderItem(renderFn) {\n this.#renderItem = renderFn;\n this.renderItems();\n }\n\n set renderer(fn) {\n // fn takes (root, comboBox, model) as arguments\n this.baseElement.renderer = fn;\n }\n\n get loading() {\n return this.getAttribute('loading') === 'true';\n }\n\n set loading(val) {\n if (val) {\n this.setAttribute('loading', 'true');\n } else {\n this.removeAttribute('loading');\n }\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n 'could not parse data string from attribute \"data\" -',\n e.message,\n );\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.(\n (acc, item) => acc + (this.renderItem?.(item || {}) || ''),\n '',\n );\n }\n\n renderItems() {\n if (this.#data || this.getAttribute('data')) {\n const template = this.getItemsTemplate();\n this.innerHTML = template;\n }\n }\n\n get hasDynamicData() {\n return this.getAttribute('has-dynamic-data') === 'true';\n }\n\n get shouldSelectItemOnItemsChange() {\n return !this.hasDynamicData || this.allowCustomValue;\n }\n\n handleSelectedItem() {\n const { selectedItem } = this.baseElement;\n const currentSelected = selectedItem?.['data-id'];\n\n // If the selected item is still a child, there's no need to update the value\n if (selectedItem && Array.from(this.children).includes(selectedItem)) {\n return;\n }\n\n // if previously selected item ID exists in current children, set it as selected\n if (currentSelected && this.shouldSelectItemOnItemsChange) {\n this.value = currentSelected;\n }\n\n // otherwise, if default value is specified, set default value as selected item\n if (!this.value) {\n this.setDefaultValue();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n customValueTransformFn(val) {\n return val;\n }\n\n // We want to override Vaadin's Combo Box value setter. This is needed since Vaadin couples between the\n // field that it searches the value, and the finaly display value of the input.\n // We provide a custom transform function to override that behavior.\n setComboBoxDescriptor() {\n const valueDescriptor = Object.getOwnPropertyDescriptor(\n this.inputElement.constructor.prototype,\n 'value',\n );\n\n const comboBox = this;\n\n Object.defineProperties(this.inputElement, {\n value: {\n ...valueDescriptor,\n set(val) {\n if (\n !comboBox.baseElement.items?.length &&\n !comboBox.allowCustomValue\n ) {\n return;\n }\n\n const transformedValue = comboBox.customValueTransformFn(val) || '';\n\n if (transformedValue === this.value) {\n return;\n }\n\n valueDescriptor.set.call(this, transformedValue);\n },\n },\n });\n }\n\n // vaadin api is to set props on their combo box node,\n // in order to avoid it, we are passing the children of this component\n // to the items & renderer props, so it will be used as the combo box items\n #onChildrenChange() {\n const items = Array.from(this.children);\n\n // we want the data-name attribute to be accessible as an object attribute\n items.forEach((node) => {\n Object.defineProperty(node, 'data-name', {\n value: node.getAttribute('data-name'),\n configurable: true,\n writable: true,\n });\n Object.defineProperty(node, 'data-id', {\n value: node.getAttribute('data-id'),\n configurable: true,\n writable: true,\n });\n });\n\n this.baseElement.items = items;\n setTimeout(() => {\n // set timeout to ensure this runs after customValueTransformFn had the chance to be overriden\n this.handleSelectedItem();\n }, 0);\n }\n\n // the default vaadin behavior is to attach the overlay to the body when opened\n // we do not want that because it's difficult to style the overlay in this way\n // so we override it to open inside the shadow DOM\n #overrideOverlaySettings() {\n const overlay = this.baseElement.shadowRoot.querySelector(\n 'vaadin-combo-box-overlay',\n );\n overlay._attachOverlay = () => {\n overlay.bringToFront();\n };\n overlay._detachOverlay = () => {};\n overlay._enterModalState = () => {};\n }\n\n #overrideRenderer() {\n // use vaadin combobox custom renderer to render options as HTML\n // and not via default renderer, which renders only the data-name's value\n // in its own HTML template\n this.baseElement.renderer = (root, combo, model) => {\n // eslint-disable-next-line no-param-reassign\n root.innerHTML = model.item.outerHTML;\n };\n }\n\n #disableDataProviderFilterEventIfNeeded() {\n if (this.hasDynamicData) {\n // For the autocomplete field, we don't want to trigger the data provider filter changed event\n // because it changes the loading state on every keystroke, making the overlay open and close\n // on every keystroke, causing a flickering effect in the loading state.\n this.baseElement._dataProviderFilterChanged = () => {};\n }\n }\n\n init() {\n super.init?.();\n\n // eslint-disable-next-line func-names\n this.getValidity = function () {\n if (!this.value && this.isRequired) {\n return {\n valueMissing: true,\n };\n }\n return {};\n };\n\n this.setComboBoxDescriptor();\n this.#overrideOverlaySettings();\n this.#overrideRenderer();\n this.#disableDataProviderFilterEventIfNeeded();\n\n // Set up observers - order matters here since renderItems can clear innerHTML\n observeAttributes(this, this.renderItems.bind(this), {\n includeAttrs: ['data'],\n });\n observeChildren(this, this.#onChildrenChange.bind(this));\n\n this.setDefaultValue();\n\n // Using \"value-changed\" event instead of \"selected-item-changed\" event to avoid\n // the issue of the value not being updated in the input field when the user enter a custom value\n this.baseElement.addEventListener('value-changed', () => {\n this.dispatchEvent(\n new Event('input', { bubbles: true, composed: true }),\n );\n });\n\n this.baseElement.addEventListener('filter-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent('filter-changed', {\n bubbles: true,\n composed: true,\n detail: e.detail,\n }),\n );\n });\n }\n\n onLabelClick() {\n if (this.isReadOnly || this.isDisabled) {\n return;\n }\n this.focus();\n if (!this.autoOpenDisabled) {\n this.setAttribute('opened', 'true');\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'label-type') {\n if (newValue === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n }\n }\n }\n\n setDefaultValue() {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n }\n\n #getChildToSelect(val) {\n return this.baseElement.items?.find((item) => item['data-id'] === val);\n }\n\n #preventSelectedItemChangeEventIfNeeded(val, selectedChild) {\n // If the actual value didn't change, but the selected item did (the element changed),\n // we want to stop the event propagation since it's not a real change\n const shouldPreventItemChangeEvent =\n val === this.value && selectedChild !== this.baseElement.selectedItem;\n if (shouldPreventItemChangeEvent) {\n this.baseElement.addEventListener(\n 'selected-item-changed',\n (e) => {\n e.stopImmediatePropagation();\n },\n { once: true, capture: true },\n );\n }\n }\n\n set value(val) {\n const selectedChild = this.#getChildToSelect(val);\n this.#preventSelectedItemChangeEventIfNeeded(val, selectedChild);\n if (val && selectedChild) {\n this.baseElement.selectedItem = selectedChild;\n } else if (!selectedChild && this.allowCustomValue) {\n this.baseElement.value = val;\n } else {\n this.baseElement.selectedItem = undefined;\n }\n }\n\n get value() {\n return this.baseElement.selectedItem?.['data-id'] || this.allowCustomValue\n ? this.baseElement.__data.value || ''\n : '';\n }\n\n get allowCustomValue() {\n return this.getAttribute('allow-custom-value') === 'true';\n }\n\n get autoOpenDisabled() {\n return this.getAttribute('auto-open-disabled') === 'true';\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n placeholder,\n toggle,\n clearButton,\n label,\n requiredIndicator,\n helperText,\n errorMessage,\n loader,\n overlayContent,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: 'input' },\n placeholder: { selector: '> input:placeholder-shown' },\n toggle: { selector: '::part(toggle-button)' },\n clearButton: { selector: '::part(clear-button)' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n loader: { selector: 'vaadin-combo-box-overlay::part(loader)' },\n overlayContent: { selector: 'vaadin-combo-box-overlay::part(content)' },\n};\n\nexport const ComboBoxClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, placeholder, inputField, helperText, errorMessage],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: {\n ...errorMessage,\n property: 'background-repeat',\n },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n inputHeight: { ...inputField, property: 'height' },\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n inputValueTextColor: { ...inputField, property: 'color' },\n inputPlaceholderTextColor: { ...placeholder, property: 'color' },\n inputDropdownButtonCursor: [\n { ...toggle, property: 'cursor' },\n { ...clearButton, property: 'cursor' },\n ],\n inputDropdownButtonColor: [\n { ...toggle, property: 'color' },\n { ...clearButton, property: 'color' },\n ],\n inputDropdownButtonSize: [\n { ...toggle, property: 'font-size' },\n { ...clearButton, property: 'font-size' },\n ],\n inputDropdownButtonOffset: [\n { ...toggle, property: 'margin-right' },\n { ...toggle, property: 'margin-left' },\n ],\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: { ...placeholder, property: 'opacity' },\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: { ...inputElement, property: 'margin-bottom' },\n\n // we need to use the variables from the portal mixin\n // so we need to use an arrow function on the selector\n // for that to work, because ComboBox is not available\n // at this time.\n overlayBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.backgroundColor,\n },\n overlayTextColor: {\n property: () => ComboBoxClass.cssVarList.overlay.textColor,\n },\n overlayBorder: {\n property: () => ComboBoxClass.cssVarList.overlay.border,\n },\n overlayFontSize: {\n property: () => ComboBoxClass.cssVarList.overlay.fontSize,\n },\n overlayFontFamily: {\n property: () => ComboBoxClass.cssVarList.overlay.fontFamily,\n },\n overlayCursor: {\n property: () => ComboBoxClass.cssVarList.overlay.cursor,\n },\n overlayItemBoxShadow: {\n property: () => ComboBoxClass.cssVarList.overlay.itemBoxShadow,\n },\n overlayItemPaddingInlineStart: {\n property: () => ComboBoxClass.cssVarList.overlay.itemPaddingInlineStart,\n },\n overlayItemPaddingInlineEnd: {\n property: () => ComboBoxClass.cssVarList.overlay.itemPaddingInlineEnd,\n },\n overlayCheckmarkDisplay: {\n property: () => ComboBoxClass.cssVarList.overlay.checkmarkDisplay,\n },\n overlaySelectedItemBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.selectedItemBackground,\n },\n overlaySelectedItemHoverBackground: {\n property: () =>\n ComboBoxClass.cssVarList.overlay.selectedItemHoverBackground,\n },\n overlaySelectedItemFocusBackground: {\n property: () =>\n ComboBoxClass.cssVarList.overlay.selectedItemFocusBackground,\n },\n overlayItemHoverBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.itemHoverBackground,\n },\n overlayItemFocusBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.itemFocusBackground,\n },\n },\n }),\n draggableMixin,\n portalMixin({\n name: 'overlay',\n selector: '',\n mappings: {\n backgroundColor: [\n { selector: 'vaadin-combo-box-scroller' },\n { selector: 'vaadin-combo-box-overlay::part(overlay)' },\n ],\n minHeight: { selector: 'vaadin-combo-box-overlay' },\n margin: { selector: 'vaadin-combo-box-overlay' },\n cursor: { selector: 'vaadin-combo-box-item' },\n fontFamily: { selector: 'vaadin-combo-box-item' },\n textColor: { selector: 'vaadin-combo-box-item', property: 'color' },\n fontSize: { selector: 'vaadin-combo-box-item' },\n itemBoxShadow: {\n selector: 'vaadin-combo-box-item',\n property: 'box-shadow',\n },\n itemPaddingInlineStart: {\n selector: 'vaadin-combo-box-item',\n property: 'padding-inline-start',\n },\n itemPaddingInlineEnd: {\n selector: 'vaadin-combo-box-item',\n property: 'padding-inline-end',\n },\n checkmarkDisplay: {\n selector: 'vaadin-combo-box-item::part(checkmark)',\n property: 'display',\n },\n selectedItemBackground: {\n selector: 'vaadin-combo-box-item[selected]',\n property: 'background-color',\n },\n selectedItemHoverBackground: {\n selector: 'vaadin-combo-box-item[selected]:hover:not([disabled])',\n property: 'background-color',\n },\n selectedItemFocusBackground: {\n selector: 'vaadin-combo-box-item[selected][focused]:not([disabled])',\n property: 'background-color',\n },\n itemHoverBackground: {\n selector: 'vaadin-combo-box-item:hover:not([selected]):not([disabled])',\n property: 'background-color',\n },\n itemFocusBackground: {\n selector:\n 'vaadin-combo-box-item[focused]:not([selected]):not([disabled])',\n property: 'background-color',\n },\n\n loaderTop: { ...loader, property: 'top' },\n loaderLeft: { ...loader, property: 'left' },\n loaderRight: { ...loader, property: 'right' },\n loaderMargin: { ...loader, property: 'margin' },\n loaderWidth: { ...loader, property: 'width' },\n loaderHeight: { ...loader, property: 'height' },\n loaderBorder: { ...loader, property: 'border' },\n loaderBorderColor: { ...loader, property: 'border-color' },\n loaderBorderRadius: { ...loader, property: 'border-radius' },\n contentHeight: { ...overlayContent, property: 'height' },\n contentOpacity: { ...overlayContent, property: 'opacity' },\n scrollerMinHeight: {\n selector: 'vaadin-combo-box-scroller',\n property: 'min-height',\n },\n },\n forward: {\n include: false,\n attributes: ['size'],\n },\n }),\n proxyInputMixin({\n proxyProps: ['selectionStart'],\n inputEvent: 'value-changed',\n }),\n componentNameValidationMixin,\n ComboBoxMixin,\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-combo-box',\n style: () => `\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${useHostExternalPadding(ComboBoxClass.cssVarList)}\n\t\t${resetInputReadonlyStyle('vaadin-combo-box')}\n\t\t${resetInputPlaceholder('vaadin-combo-box')}\n\t\t${resetInputCursor('vaadin-combo-box')}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot=\"input\"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button=\"true\"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${resetInputLabelPosition('vaadin-combo-box')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property\n // with the same name. Including it will cause Vaadin to calculate NaN size,\n // and reset items to an empty array, and opening the list box with no items\n // to display.\n excludeAttrsSync: ['tabindex', 'size', 'data', 'loading'],\n componentName,\n includeForwardProps: ['items', 'renderer', 'selectedItem'],\n }),\n);\n"],"names":["customElements","define","C","componentName","host","inputField","inputElement","placeholder","toggle","clearButton","label","requiredIndicator","helperText","errorMessage","loader","overlayContent","selector","ComboBoxClass","mappings","hostWidth","property","hostDirection","fontSize","fontFamily","labelFontSize","labelFontWeight","labelTextColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","inputHeight","inputBackgroundColor","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","labelRequiredIndicator","inputValueTextColor","inputPlaceholderTextColor","inputDropdownButtonCursor","inputDropdownButtonColor","inputDropdownButtonSize","inputDropdownButtonOffset","inputOutlineColor","inputOutlineWidth","inputOutlineStyle","inputOutlineOffset","inputHorizontalPadding","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","overlayBackground","cssVarList","overlay","backgroundColor","overlayTextColor","textColor","overlayBorder","border","overlayFontSize","overlayFontFamily","overlayCursor","cursor","overlayItemBoxShadow","itemBoxShadow","overlayItemPaddingInlineStart","itemPaddingInlineStart","overlayItemPaddingInlineEnd","itemPaddingInlineEnd","overlayCheckmarkDisplay","checkmarkDisplay","overlaySelectedItemBackground","selectedItemBackground","overlaySelectedItemHoverBackground","selectedItemHoverBackground","overlaySelectedItemFocusBackground","selectedItemFocusBackground","overlayItemHoverBackground","itemHoverBackground","overlayItemFocusBackground","itemFocusBackground","name","minHeight","margin","loaderTop","loaderLeft","loaderRight","loaderMargin","loaderWidth","loaderHeight","loaderBorder","loaderBorderColor","loaderBorderRadius","contentHeight","contentOpacity","scrollerMinHeight","forward","include","attributes","proxyProps","inputEvent","superclass","observedAttributes","displayName","value","defaultValue","this","getAttribute","renderItem","renderFn","renderItems","renderer","fn","baseElement","loading","val","setAttribute","removeAttribute","data","dataAttr","JSON","parse","isValidDataType","e","console","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","hasDynamicData","shouldSelectItemOnItemsChange","allowCustomValue","handleSelectedItem","selectedItem","currentSelected","from","children","includes","setDefaultValue","customValueTransformFn","setComboBoxDescriptor","valueDescriptor","Object","getOwnPropertyDescriptor","constructor","prototype","comboBox","defineProperties","set","items","length","transformedValue","call","forEach","node","defineProperty","configurable","writable","setTimeout","shadowRoot","querySelector","_attachOverlay","bringToFront","_detachOverlay","_enterModalState","root","combo","model","outerHTML","_dataProviderFilterChanged","init","super","getValidity","isRequired","valueMissing","bind","includeAttrs","addEventListener","dispatchEvent","Event","bubbles","composed","CustomEvent","detail","onLabelClick","isReadOnly","isDisabled","focus","autoOpenDisabled","attributeChangedCallback","attrName","oldValue","newValue","removeEventListener","find","selectedChild","stopImmediatePropagation","once","capture","undefined","__data","slots","wrappedEleName","style","excludeAttrsSync","includeForwardProps"],"sourceRoot":""}
1
+ {"version":3,"file":"7092.js","mappings":"4NAGAA,eAAeC,OAAO,IAAe,EAAAC,E,2FCoB9B,MAAMC,GAAgB,QAAiB,cA+VxC,KACJC,EAAI,WACJC,EAAU,aACVC,EAAY,YACZC,EAAW,OACXC,EAAM,YACNC,EAAW,MACXC,EAAK,kBACLC,EAAiB,WACjBC,EAAU,aACVC,EAAY,OACZC,EAAM,eACNC,GACE,CACFX,KAAM,CAAEY,SAAU,IAAM,SACxBX,WAAY,CAAEW,SAAU,uBACxBV,aAAc,CAAEU,SAAU,SAC1BT,YAAa,CAAES,SAAU,6BACzBR,OAAQ,CAAEQ,SAAU,yBACpBP,YAAa,CAAEO,SAAU,wBACzBN,MAAO,C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,UACZC,eAAgB,mBAChBC,MAAO,IAAM,2HAMb,QAAuB5M,EAAc8C,qBACrC,QAAwB,6BACxB,QAAsB,6BACtB,QAAiB,u2BAoCf,QAAwB,6BACxB,kBAMF+J,iBAAkB,CAAC,WAAY,OAAQ,OAAQ,WAC/C3N,gBACA4N,oBAAqB,CAAC,QAAS,WAAY,kB","sources":["webpack://@descope/web-components-ui/../components/descope-combo-box/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-combo-box/src/component/ComboBoxClass.js"],"sourcesContent":["import '@vaadin/combo-box';\nimport { componentName, ComboBoxClass } from './ComboBoxClass';\n\ncustomElements.define(componentName, ComboBoxClass);\n\nexport { ComboBoxClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputPlaceholder,\n resetInputReadonlyStyle,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '@descope-ui/common/theme-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n portalMixin,\n proxyInputMixin,\n} from '@descope-ui/common/components-mixins';\n\nexport const componentName = getComponentName('combo-box');\n\nconst ComboBoxMixin = (superclass) =>\n class ComboBoxMixinClass extends superclass {\n static get observedAttributes() {\n return ['label-type'];\n }\n\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ displayName, value, label }) => {\n return `<span data-name=\"${label}\" data-id=\"${value}\">${\n displayName || label\n }</span>`;\n };\n\n #data;\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n get renderItem() {\n return this.#renderItem;\n }\n\n set renderItem(renderFn) {\n this.#renderItem = renderFn;\n this.renderItems();\n }\n\n set renderer(fn) {\n // fn takes (root, comboBox, model) as arguments\n this.baseElement.renderer = fn;\n }\n\n get loading() {\n return this.getAttribute('loading') === 'true';\n }\n\n set loading(val) {\n if (val) {\n this.setAttribute('loading', 'true');\n } else {\n this.removeAttribute('loading');\n }\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n 'could not parse data string from attribute \"data\" -',\n e.message,\n );\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.(\n (acc, item) => acc + (this.renderItem?.(item || {}) || ''),\n '',\n );\n }\n\n renderItems() {\n if (this.#data || this.getAttribute('data')) {\n const template = this.getItemsTemplate();\n this.innerHTML = template;\n }\n }\n\n get hasDynamicData() {\n return this.getAttribute('has-dynamic-data') === 'true';\n }\n\n get shouldSelectItemOnItemsChange() {\n return !this.hasDynamicData || this.allowCustomValue;\n }\n\n handleSelectedItem() {\n const { selectedItem } = this.baseElement;\n const currentSelected = selectedItem?.['data-id'];\n\n // If the selected item is still a child, there's no need to update the value\n if (selectedItem && Array.from(this.children).includes(selectedItem)) {\n return;\n }\n\n // if previously selected item ID exists in current children, set it as selected\n if (currentSelected && this.shouldSelectItemOnItemsChange) {\n this.value = currentSelected;\n }\n\n // otherwise, if default value is specified, set default value as selected item\n if (!this.value) {\n this.setDefaultValue();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n customValueTransformFn(val) {\n return val;\n }\n\n // We want to override Vaadin's Combo Box value setter. This is needed since Vaadin couples between the\n // field that it searches the value, and the finaly display value of the input.\n // We provide a custom transform function to override that behavior.\n setComboBoxDescriptor() {\n const valueDescriptor = Object.getOwnPropertyDescriptor(\n this.inputElement.constructor.prototype,\n 'value',\n );\n\n const comboBox = this;\n\n Object.defineProperties(this.inputElement, {\n value: {\n ...valueDescriptor,\n set(val) {\n if (\n !comboBox.baseElement.items?.length &&\n !comboBox.allowCustomValue\n ) {\n return;\n }\n\n const transformedValue = comboBox.customValueTransformFn(val) || '';\n\n if (transformedValue === this.value) {\n return;\n }\n\n valueDescriptor.set.call(this, transformedValue);\n },\n },\n });\n }\n\n // vaadin api is to set props on their combo box node,\n // in order to avoid it, we are passing the children of this component\n // to the items & renderer props, so it will be used as the combo box items\n #onChildrenChange() {\n const items = Array.from(this.children);\n\n // we want the data-name attribute to be accessible as an object attribute\n items.forEach((node) => {\n Object.defineProperty(node, 'data-name', {\n value: node.getAttribute('data-name'),\n configurable: true,\n writable: true,\n });\n Object.defineProperty(node, 'data-id', {\n value: node.getAttribute('data-id'),\n configurable: true,\n writable: true,\n });\n });\n\n this.baseElement.items = items;\n setTimeout(() => {\n // set timeout to ensure this runs after customValueTransformFn had the chance to be overriden\n this.handleSelectedItem();\n }, 0);\n }\n\n // the default vaadin behavior is to attach the overlay to the body when opened\n // we do not want that because it's difficult to style the overlay in this way\n // so we override it to open inside the shadow DOM\n #overrideOverlaySettings() {\n const overlay = this.baseElement.shadowRoot.querySelector(\n 'vaadin-combo-box-overlay',\n );\n overlay._attachOverlay = () => {\n overlay.bringToFront();\n };\n overlay._detachOverlay = () => {};\n overlay._enterModalState = () => {};\n }\n\n #overrideRenderer() {\n // use vaadin combobox custom renderer to render options as HTML\n // and not via default renderer, which renders only the data-name's value\n // in its own HTML template\n this.baseElement.renderer = (root, combo, model) => {\n // eslint-disable-next-line no-param-reassign\n root.innerHTML = model.item.outerHTML;\n };\n }\n\n #disableDataProviderFilterEventIfNeeded() {\n if (this.hasDynamicData) {\n // For the autocomplete field, we don't want to trigger the data provider filter changed event\n // because it changes the loading state on every keystroke, making the overlay open and close\n // on every keystroke, causing a flickering effect in the loading state.\n this.baseElement._dataProviderFilterChanged = () => {};\n }\n }\n\n init() {\n super.init?.();\n\n // eslint-disable-next-line func-names\n this.getValidity = function () {\n if (!this.value && this.isRequired) {\n return {\n valueMissing: true,\n };\n }\n return {};\n };\n\n this.setComboBoxDescriptor();\n this.#overrideOverlaySettings();\n this.#overrideRenderer();\n this.#disableDataProviderFilterEventIfNeeded();\n\n // Set up observers - order matters here since renderItems can clear innerHTML\n observeAttributes(this, this.renderItems.bind(this), {\n includeAttrs: ['data'],\n });\n observeChildren(this, this.#onChildrenChange.bind(this));\n\n this.setDefaultValue();\n\n // Using \"value-changed\" event instead of \"selected-item-changed\" event to avoid\n // the issue of the value not being updated in the input field when the user enter a custom value\n this.baseElement.addEventListener('value-changed', () => {\n this.dispatchEvent(\n new Event('input', { bubbles: true, composed: true }),\n );\n });\n\n this.baseElement.addEventListener('filter-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent('filter-changed', {\n bubbles: true,\n composed: true,\n detail: e.detail,\n }),\n );\n });\n }\n\n onLabelClick() {\n if (this.isReadOnly || this.isDisabled) {\n return;\n }\n this.focus();\n if (!this.autoOpenDisabled) {\n this.setAttribute('opened', 'true');\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'label-type') {\n if (newValue === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n }\n }\n }\n\n setDefaultValue() {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n }\n\n #getChildToSelect(val) {\n return this.baseElement.items?.find((item) => item['data-id'] === val);\n }\n\n #preventSelectedItemChangeEventIfNeeded(val, selectedChild) {\n // If the actual value didn't change, but the selected item did (the element changed),\n // we want to stop the event propagation since it's not a real change\n const shouldPreventItemChangeEvent =\n val === this.value && selectedChild !== this.baseElement.selectedItem;\n if (shouldPreventItemChangeEvent) {\n this.baseElement.addEventListener(\n 'selected-item-changed',\n (e) => {\n e.stopImmediatePropagation();\n },\n { once: true, capture: true },\n );\n }\n }\n\n set value(val) {\n const selectedChild = this.#getChildToSelect(val);\n this.#preventSelectedItemChangeEventIfNeeded(val, selectedChild);\n if (val && selectedChild) {\n this.baseElement.selectedItem = selectedChild;\n } else if (!selectedChild && this.allowCustomValue) {\n this.baseElement.value = val;\n } else {\n this.baseElement.selectedItem = undefined;\n }\n }\n\n get value() {\n return this.baseElement.selectedItem?.['data-id'] || this.allowCustomValue\n ? this.baseElement.__data.value || ''\n : '';\n }\n\n get allowCustomValue() {\n return this.getAttribute('allow-custom-value') === 'true';\n }\n\n get autoOpenDisabled() {\n return this.getAttribute('auto-open-disabled') === 'true';\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n placeholder,\n toggle,\n clearButton,\n label,\n requiredIndicator,\n helperText,\n errorMessage,\n loader,\n overlayContent,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: 'input' },\n placeholder: { selector: '> input:placeholder-shown' },\n toggle: { selector: '::part(toggle-button)' },\n clearButton: { selector: '::part(clear-button)' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n loader: { selector: 'vaadin-combo-box-overlay::part(loader)' },\n overlayContent: { selector: 'vaadin-combo-box-overlay::part(content)' },\n};\n\nexport const ComboBoxClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, placeholder, inputField, helperText, errorMessage],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: {\n ...errorMessage,\n property: 'background-repeat',\n },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n inputHeight: { ...inputField, property: 'height' },\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n inputValueTextColor: { ...inputField, property: 'color' },\n inputPlaceholderTextColor: { ...placeholder, property: 'color' },\n inputDropdownButtonCursor: [\n { ...toggle, property: 'cursor' },\n { ...clearButton, property: 'cursor' },\n ],\n inputDropdownButtonColor: [\n { ...toggle, property: 'color' },\n { ...clearButton, property: 'color' },\n ],\n inputDropdownButtonSize: [\n { ...toggle, property: 'font-size' },\n { ...clearButton, property: 'font-size' },\n ],\n inputDropdownButtonOffset: [\n { ...toggle, property: 'margin-right' },\n { ...toggle, property: 'margin-left' },\n ],\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: { ...placeholder, property: 'opacity' },\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: { ...inputElement, property: 'margin-bottom' },\n\n // we need to use the variables from the portal mixin\n // so we need to use an arrow function on the selector\n // for that to work, because ComboBox is not available\n // at this time.\n overlayBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.backgroundColor,\n },\n overlayTextColor: {\n property: () => ComboBoxClass.cssVarList.overlay.textColor,\n },\n overlayBorder: {\n property: () => ComboBoxClass.cssVarList.overlay.border,\n },\n overlayFontSize: {\n property: () => ComboBoxClass.cssVarList.overlay.fontSize,\n },\n overlayFontFamily: {\n property: () => ComboBoxClass.cssVarList.overlay.fontFamily,\n },\n overlayCursor: {\n property: () => ComboBoxClass.cssVarList.overlay.cursor,\n },\n overlayItemBoxShadow: {\n property: () => ComboBoxClass.cssVarList.overlay.itemBoxShadow,\n },\n overlayItemPaddingInlineStart: {\n property: () => ComboBoxClass.cssVarList.overlay.itemPaddingInlineStart,\n },\n overlayItemPaddingInlineEnd: {\n property: () => ComboBoxClass.cssVarList.overlay.itemPaddingInlineEnd,\n },\n overlayCheckmarkDisplay: {\n property: () => ComboBoxClass.cssVarList.overlay.checkmarkDisplay,\n },\n overlaySelectedItemBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.selectedItemBackground,\n },\n overlaySelectedItemHoverBackground: {\n property: () =>\n ComboBoxClass.cssVarList.overlay.selectedItemHoverBackground,\n },\n overlaySelectedItemFocusBackground: {\n property: () =>\n ComboBoxClass.cssVarList.overlay.selectedItemFocusBackground,\n },\n overlayItemHoverBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.itemHoverBackground,\n },\n overlayItemFocusBackground: {\n property: () => ComboBoxClass.cssVarList.overlay.itemFocusBackground,\n },\n },\n }),\n draggableMixin,\n portalMixin({\n name: 'overlay',\n selector: '',\n mappings: {\n backgroundColor: [\n { selector: 'vaadin-combo-box-scroller' },\n { selector: 'vaadin-combo-box-overlay::part(overlay)' },\n ],\n minHeight: { selector: 'vaadin-combo-box-overlay' },\n margin: { selector: 'vaadin-combo-box-overlay' },\n cursor: { selector: 'vaadin-combo-box-item' },\n fontFamily: { selector: 'vaadin-combo-box-item' },\n textColor: { selector: 'vaadin-combo-box-item', property: 'color' },\n fontSize: { selector: 'vaadin-combo-box-item' },\n itemBoxShadow: {\n selector: 'vaadin-combo-box-item',\n property: 'box-shadow',\n },\n itemPaddingInlineStart: {\n selector: 'vaadin-combo-box-item',\n property: 'padding-inline-start',\n },\n itemPaddingInlineEnd: {\n selector: 'vaadin-combo-box-item',\n property: 'padding-inline-end',\n },\n checkmarkDisplay: {\n selector: 'vaadin-combo-box-item::part(checkmark)',\n property: 'display',\n },\n selectedItemBackground: {\n selector: 'vaadin-combo-box-item[selected]',\n property: 'background-color',\n },\n selectedItemHoverBackground: {\n selector: 'vaadin-combo-box-item[selected]:hover:not([disabled])',\n property: 'background-color',\n },\n selectedItemFocusBackground: {\n selector: 'vaadin-combo-box-item[selected][focused]:not([disabled])',\n property: 'background-color',\n },\n itemHoverBackground: {\n selector: 'vaadin-combo-box-item:hover:not([selected]):not([disabled])',\n property: 'background-color',\n },\n itemFocusBackground: {\n selector:\n 'vaadin-combo-box-item[focused]:not([selected]):not([disabled])',\n property: 'background-color',\n },\n\n loaderTop: { ...loader, property: 'top' },\n loaderLeft: { ...loader, property: 'left' },\n loaderRight: { ...loader, property: 'right' },\n loaderMargin: { ...loader, property: 'margin' },\n loaderWidth: { ...loader, property: 'width' },\n loaderHeight: { ...loader, property: 'height' },\n loaderBorder: { ...loader, property: 'border' },\n loaderBorderColor: { ...loader, property: 'border-color' },\n loaderBorderRadius: { ...loader, property: 'border-radius' },\n contentHeight: { ...overlayContent, property: 'height' },\n contentOpacity: { ...overlayContent, property: 'opacity' },\n scrollerMinHeight: {\n selector: 'vaadin-combo-box-scroller',\n property: 'min-height',\n },\n },\n forward: {\n include: false,\n attributes: ['size'],\n },\n }),\n proxyInputMixin({\n proxyProps: ['selectionStart'],\n inputEvent: 'value-changed',\n }),\n componentNameValidationMixin,\n ComboBoxMixin,\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-combo-box',\n style: () => `\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${useHostExternalPadding(ComboBoxClass.cssVarList)}\n\t\t${resetInputReadonlyStyle('vaadin-combo-box')}\n\t\t${resetInputPlaceholder('vaadin-combo-box')}\n\t\t${resetInputCursor('vaadin-combo-box')}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot=\"input\"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button=\"true\"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${resetInputLabelPosition('vaadin-combo-box')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n // Note: we exclude `size` to avoid overriding Vaadin's ComboBox property\n // with the same name. Including it will cause Vaadin to calculate NaN size,\n // and reset items to an empty array, and opening the list box with no items\n // to display.\n excludeAttrsSync: ['tabindex', 'size', 'data', 'loading'],\n componentName,\n includeForwardProps: ['items', 'renderer', 'selectedItem'],\n }),\n);\n"],"names":["customElements","define","C","componentName","host","inputField","inputElement","placeholder","toggle","clearButton","label","requiredIndicator","helperText","errorMessage","loader","overlayContent","selector","ComboBoxClass","mappings","hostWidth","property","hostDirection","fontSize","fontFamily","labelFontSize","labelFontWeight","labelTextColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputHeight","inputBackgroundColor","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","labelRequiredIndicator","inputValueTextColor","inputPlaceholderTextColor","inputDropdownButtonCursor","inputDropdownButtonColor","inputDropdownButtonSize","inputDropdownButtonOffset","inputOutlineColor","inputOutlineWidth","inputOutlineStyle","inputOutlineOffset","inputHorizontalPadding","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","overlayBackground","cssVarList","overlay","backgroundColor","overlayTextColor","textColor","overlayBorder","border","overlayFontSize","overlayFontFamily","overlayCursor","cursor","overlayItemBoxShadow","itemBoxShadow","overlayItemPaddingInlineStart","itemPaddingInlineStart","overlayItemPaddingInlineEnd","itemPaddingInlineEnd","overlayCheckmarkDisplay","checkmarkDisplay","overlaySelectedItemBackground","selectedItemBackground","overlaySelectedItemHoverBackground","selectedItemHoverBackground","overlaySelectedItemFocusBackground","selectedItemFocusBackground","overlayItemHoverBackground","itemHoverBackground","overlayItemFocusBackground","itemFocusBackground","name","minHeight","margin","loaderTop","loaderLeft","loaderRight","loaderMargin","loaderWidth","loaderHeight","loaderBorder","loaderBorderColor","loaderBorderRadius","contentHeight","contentOpacity","scrollerMinHeight","forward","include","attributes","proxyProps","inputEvent","superclass","observedAttributes","displayName","value","defaultValue","this","getAttribute","renderItem","renderFn","renderItems","renderer","fn","baseElement","loading","val","setAttribute","removeAttribute","data","dataAttr","JSON","parse","isValidDataType","e","console","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","hasDynamicData","shouldSelectItemOnItemsChange","allowCustomValue","handleSelectedItem","selectedItem","currentSelected","from","children","includes","setDefaultValue","customValueTransformFn","setComboBoxDescriptor","valueDescriptor","Object","getOwnPropertyDescriptor","constructor","prototype","comboBox","defineProperties","set","items","length","transformedValue","call","forEach","node","defineProperty","configurable","writable","setTimeout","shadowRoot","querySelector","_attachOverlay","bringToFront","_detachOverlay","_enterModalState","root","combo","model","outerHTML","_dataProviderFilterChanged","init","super","getValidity","isRequired","valueMissing","bind","includeAttrs","addEventListener","dispatchEvent","Event","bubbles","composed","CustomEvent","detail","onLabelClick","isReadOnly","isDisabled","focus","autoOpenDisabled","attributeChangedCallback","attrName","oldValue","newValue","removeEventListener","find","selectedChild","stopImmediatePropagation","once","capture","undefined","__data","slots","wrappedEleName","style","excludeAttrsSync","includeForwardProps"],"sourceRoot":""}