@descope/web-components-ui 1.77.0 → 1.78.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.
- package/dist/cjs/index.cjs.js +49 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +49 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/2739.js +1 -1
- package/dist/umd/2739.js.map +1 -1
- package/dist/umd/7092.js +1 -1
- package/dist/umd/7092.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.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/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.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-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-hybrid-field-index-js.js +2 -2
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +2 -2
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-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-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js.map +1 -1
- package/dist/umd/descope-text-field-index-js.js +2 -2
- package/dist/umd/descope-text-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-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 +6 -6
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -0
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +1 -0
- package/src/components/descope-hybrid-field/HybridFieldClass.js +10 -0
- package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +1 -0
- package/src/components/descope-new-password/NewPasswordClass.js +1 -0
- package/src/components/descope-passcode/PasscodeClass.js +1 -0
- package/src/components/descope-password/PasswordClass.js +2 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +4 -0
- package/src/components/descope-text-area/TextAreaClass.js +1 -0
- package/src/components/descope-text-field/textFieldMappings.js +1 -0
- package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +1 -0
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
- package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +1 -0
- package/src/theme/components/checkbox.js +1 -0
- package/src/theme/components/emailField.js +1 -0
- package/src/theme/components/hybridField.js +1 -0
- package/src/theme/components/inputWrapper.js +1 -0
- package/src/theme/components/multiSelectComboBox.js +1 -0
- package/src/theme/components/newPassword.js +1 -0
- package/src/theme/components/numberField.js +1 -0
- package/src/theme/components/passcode.js +1 -0
- package/src/theme/components/password.js +1 -0
- package/src/theme/components/phoneField.js +1 -0
- package/src/theme/components/phoneInputBoxField.js +1 -0
- package/src/theme/components/radioGroup/radioGroup.js +1 -0
- package/src/theme/components/samlGroupMappings.js +1 -0
- package/src/theme/components/switchToggle.js +1 -0
- package/src/theme/components/textArea.js +1 -0
- package/src/theme/components/textField.js +1 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-password-index-js.js","mappings":"2NAkBO,MAAMA,GAAgB,QAAiB,aA4GxC,KACJC,EAAI,WACJC,EAAU,aACVC,EAAY,wBACZC,EAAuB,sBACvBC,EAAqB,iBACrBC,EAAgB,MAChBC,EAAK,kBACLC,EAAiB,aACjBC,EAAY,WACZC,GACE,CACF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EAKOG,EAAwB,CAACH,EAAMhB,EAAM,UAAY,SACxDgB,iBAAoBhB,2BACvBgB,iBAAoBhB,gDAgBVoB,EAA8B,IAAM,uGAOpCC,EAA2BL,GAAS,SAC3CA,8DAKOM,EAAyCN,GAAS,SACzDA,oEAKOO,EAAsB,CAACP,EAAMpB,IAAe,SACnDmB,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMpB,IAAe,SAClDoB,kCACAA,8CACAA,wCACAA,yCACAA,0EACiCpB,EAAWjE,wDAClBiE,EAAWvF,oBAAoBuF,EAAWrF,wCA4BpEiH,CAAmBR,EAAMpB,WACzB0B,EAAsCN,WAnFV,CAACA,GAAS,SACtCA,yCAmFAS,CAAmBT,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAU,CAAkBV,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAW,CAAiCX,OAM1BY,EAA2BZ,GAAS,4ZAiB3CA,yJAQOa,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-password/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n\n inputPlaceholderTextColor: [\n { ...inputElementPlaceholder, property: 'color' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'color' },\n ],\n inputValueTextColor: [\n { ...inputElement, property: 'color' },\n { selector: () => ':host ::slotted(input)', property: 'color' },\n ],\n\n revealButtonOffset: [\n { ...revealButtonContainer, property: 'margin-right' },\n { ...revealButtonContainer, property: 'margin-left' },\n ],\n revealButtonSize: { ...revealButtonContainer, property: 'font-size' },\n revealButtonColor: { ...revealButtonIcon, property: 'color' },\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: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...inputElement, property: 'opacity' },\n ],\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'password',\n inputName: 'password',\n includeAttrs: ['disabled', 'readonly', 'pattern', 'type', 'autocomplete'],\n noBlurDispatch: true,\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n passwordDraggableMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-password-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\t\t${resetInputCursor('vaadin-password-field')}\n ${resetInputLabelPosition('vaadin-password-field')}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${PasswordClass.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${inputFloatingLabelStyle()}\n \n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n","const passwordDraggableMixin = (superclass) =>\n class PasswordDraggableMixinClass extends superclass {\n get isReadOnly() {\n return this.hasAttribute('readonly') && this.getAttribute('readonly') !== 'false';\n }\n\n init() {\n // there is an issue in Chrome that input field with type password cannot be D&D\n // so in case the input is draggable & readonly, we are changing the input type to \"text\" before dragging\n // and return the original type when done\n super.init?.();\n\n const ele = this.querySelector('input');\n\n ele?.addEventListener('mousedown', (e) => {\n if (this.isDraggable && this.isReadOnly) {\n ele.setAttribute('inert', 'true');\n\n const inputEle = e.target;\n const prevType = inputEle.getAttribute('type');\n inputEle.setAttribute('type', 'text');\n setTimeout(() => {\n inputEle.focus();\n });\n\n const onComplete = (_) => {\n inputEle.setAttribute('type', prevType);\n ele.removeAttribute('inert');\n this.removeEventListener('mouseup', onComplete);\n this.removeEventListener('dragend', onComplete);\n };\n\n this.addEventListener('dragend', onComplete, { once: true });\n this.addEventListener('mouseup', onComplete, { once: true });\n }\n });\n }\n };\n\nexport default passwordDraggableMixin;\n","import '@vaadin/password-field';\nimport { componentName, PasswordClass } from './PasswordClass';\n\ncustomElements.define(componentName, PasswordClass);\n\nexport { PasswordClass, componentName };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n"],"names":["componentName","host","inputField","inputElement","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","label","requiredIndicator","errorMessage","helperText","selector","PasswordClass","mappings","hostWidth","property","hostMinWidth","hostDirection","fontSize","fontFamily","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","inputType","inputName","includeAttrs","noBlurDispatch","proxyProps","useProxyTargets","superclass","observedAttributes","manualToggleVisibility","this","getAttribute","init","super","handleCaretOnVisibilityChange","origSetPasswordVisible","baseElement","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","initExternalInput","externalInput","createExternalInput","handlePasswordVisibility","caretPosition","value","length","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","attributeChangedCallback","attrName","oldValue","newValue","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","querySelector","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","input","setAttribute","slots","wrappedEleName","style","cssVarList","excludeAttrsSync","isReadOnly","hasAttribute","ele","addEventListener","e","isDraggable","inputEle","target","prevType","focus","onComplete","_","removeAttribute","once","customElements","define","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"descope-password-index-js.js","mappings":"2NAkBO,MAAMA,GAAgB,QAAiB,aA4GxC,KACJC,EAAI,WACJC,EAAU,aACVC,EAAY,wBACZC,EAAuB,sBACvBC,EAAqB,iBACrBC,EAAgB,MAChBC,EAAK,kBACLC,EAAiB,aACjBC,EAAY,WACZC,GACE,CACFT,KAAM,CAAEU,SAAU,IAAM,SACxBT,WAAY,CAAES,SAAU,uBACxBR,aAAc,CAAEQ,SAAU,WAC1BP,wBAAyB,CAAEO,SAAU,IAAM,iCAC3CN,sBAAuB,CAAEM,SAAU,yBACnCL,iBAAkB,CAAEK,SAAU,iCAC9BJ,MAAO,CAAEI,SAAU,iBACnBH,kBAAmB,CAAEG,SAAU,+CAC/BD,WAAY,CAAEC,SAAU,uBACxBF,aAAc,CAAEE,SAAU,0BAGfC,GAAgB,SAC3B,QAAiB,CACfC,SAAU,CACRC,UAAW,IAAKb,EAAMc,SAAU,SAChCC,aAAc,IAAKf,EAAMc,SAAU,aACnCE,cAAe,IAAKhB,EAAMc,SAAU,aACpCG,SAAU,CAAC,CAAC,EAAGjB,GACfkB,WAAY,CAACZ,EAAOL,EAAYO,EAAcC,GAC9CU,YAAa,IAAKlB,EAAYa,SAAU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U,CAAkBV,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAW,CAAiCX,OAM1BY,EAA2BZ,GAAS,4ZAiB3CA,yJAQOa,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-password/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputPlaceholderTextColor: [\n { ...inputElementPlaceholder, property: 'color' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'color' },\n ],\n inputValueTextColor: [\n { ...inputElement, property: 'color' },\n { selector: () => ':host ::slotted(input)', property: 'color' },\n ],\n\n revealButtonOffset: [\n { ...revealButtonContainer, property: 'margin-right' },\n { ...revealButtonContainer, property: 'margin-left' },\n ],\n revealButtonSize: { ...revealButtonContainer, property: 'font-size' },\n revealButtonColor: { ...revealButtonIcon, property: 'color' },\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: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...inputElement, property: 'opacity' },\n ],\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'password',\n inputName: 'password',\n includeAttrs: ['disabled', 'readonly', 'pattern', 'type', 'autocomplete'],\n noBlurDispatch: true,\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n passwordDraggableMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-password-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\t\t${resetInputCursor('vaadin-password-field')}\n ${resetInputLabelPosition('vaadin-password-field')}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${PasswordClass.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${inputFloatingLabelStyle()}\n\n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n","const passwordDraggableMixin = (superclass) =>\n class PasswordDraggableMixinClass extends superclass {\n get isReadOnly() {\n return this.hasAttribute('readonly') && this.getAttribute('readonly') !== 'false';\n }\n\n init() {\n // there is an issue in Chrome that input field with type password cannot be D&D\n // so in case the input is draggable & readonly, we are changing the input type to \"text\" before dragging\n // and return the original type when done\n super.init?.();\n\n const ele = this.querySelector('input');\n\n ele?.addEventListener('mousedown', (e) => {\n if (this.isDraggable && this.isReadOnly) {\n ele.setAttribute('inert', 'true');\n\n const inputEle = e.target;\n const prevType = inputEle.getAttribute('type');\n inputEle.setAttribute('type', 'text');\n setTimeout(() => {\n inputEle.focus();\n });\n\n const onComplete = (_) => {\n inputEle.setAttribute('type', prevType);\n ele.removeAttribute('inert');\n this.removeEventListener('mouseup', onComplete);\n this.removeEventListener('dragend', onComplete);\n };\n\n this.addEventListener('dragend', onComplete, { once: true });\n this.addEventListener('mouseup', onComplete, { once: true });\n }\n });\n }\n };\n\nexport default passwordDraggableMixin;\n","import '@vaadin/password-field';\nimport { componentName, PasswordClass } from './PasswordClass';\n\ncustomElements.define(componentName, PasswordClass);\n\nexport { PasswordClass, componentName };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n"],"names":["componentName","host","inputField","inputElement","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","label","requiredIndicator","errorMessage","helperText","selector","PasswordClass","mappings","hostWidth","property","hostMinWidth","hostDirection","fontSize","fontFamily","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","inputType","inputName","includeAttrs","noBlurDispatch","proxyProps","useProxyTargets","superclass","observedAttributes","manualToggleVisibility","this","getAttribute","init","super","handleCaretOnVisibilityChange","origSetPasswordVisible","baseElement","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","initExternalInput","externalInput","createExternalInput","handlePasswordVisibility","caretPosition","value","length","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","attributeChangedCallback","attrName","oldValue","newValue","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","querySelector","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","input","setAttribute","slots","wrappedEleName","style","cssVarList","excludeAttrsSync","isReadOnly","hasAttribute","ele","addEventListener","e","isDraggable","inputEle","target","prevType","focus","onComplete","_","removeAttribute","once","customElements","define","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9399],{6424:(e,t,r)=>{r.d(t,{A:()=>x});const{host:o,label:i,placeholder:n,requiredIndicator:a,inputField:l,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,l,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},40649:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>c,componentName:()=>d});var o=r(9696),i=r(97810),n=r(73551),a=r(79365),l=r(6424);const p=(0,i.xE)("radio-button"),s=(0,o.Zz)((0,a.RF)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),(0,a.OZ)({proxyProps:["setSelectionRange"]}),a.tQ,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.Ge)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,a.tz)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.xE)("radio-group"),c=(0,o.Zz)((0,a.RF)({mappings:{...l.A,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),a.VO,(0,a.OZ)({proxyProps:["setSelectionRange"]}),a.tQ,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.EA)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.Ge)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.mx)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,a.tz)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.$J)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(54623),customElements.define(d,c),customElements.define(p,s)},73551:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>n,X6:()=>p,cy:()=>o,fu:()=>s,kG:()=>d,lS:()=>l,zm:()=>i});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9399],{6424:(e,t,r)=>{r.d(t,{A:()=>x});const{host:o,label:i,placeholder:n,requiredIndicator:a,inputField:l,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,l,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},40649:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>c,componentName:()=>d});var o=r(9696),i=r(97810),n=r(73551),a=r(79365),l=r(6424);const p=(0,i.xE)("radio-button"),s=(0,o.Zz)((0,a.RF)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),(0,a.OZ)({proxyProps:["setSelectionRange"]}),a.tQ,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.Ge)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,a.tz)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.xE)("radio-group"),c=(0,o.Zz)((0,a.RF)({mappings:{...l.A,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),a.VO,(0,a.OZ)({proxyProps:["setSelectionRange"]}),a.tQ,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.EA)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.Ge)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.mx)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,a.tz)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.$J)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(54623),customElements.define(d,c),customElements.define(p,s)},73551:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>n,X6:()=>p,cy:()=>o,fu:()=>s,kG:()=>d,lS:()=>l,zm:()=>i});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
|
2
2
|
//# sourceMappingURL=descope-radio-group-index-js.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-radio-group-index-js.js","mappings":"yJAAA,MAAM,KACJA,EAAI,MACJC,EAAK,YACLC,EAAW,kBACXC,EAAiB,WACjBC,EAAU,MACVC,EAAK,UACLC,EAAS,WACTC,EAAU,aACVC,EAAY,oBACZC,EAAmB,cACnBC,EAAa,UACbC,EAAS,cACTC,EAAa,sBACbC,EAAqB,oBACrBC,EAAmB,4BACnBC,GACE,CACFf,KAAM,CAAEgB,SAAU,IAAM,SACxBf,MAAO,CAAEe,SAAU,iBACnBb,kBAAmB,CAAEa,SAAU,+CAC/Bd,YAAa,CACX,CAAEc,SAAU,6BACZ,CAAEA,SAAU,IAAM,4CAEpBP,oBAAqB,CAAEO,SAAU,iCACjCZ,WAAY,CAAEY,SAAU,uBACxBX,MAAO,CAAEW,SAAU,SACnBV,UAAW,CAAEU,SAAU,+BACvBN,cAAe,CAAEM,SAAU,kBAC3BT,WAAY,CAAES,SAAU,uBACxBR,aAAc,CAAEQ,SAAU,yBAC1BL,UAAW,CAAEK,SAAU,eACvBJ,cAAe,CAAEI,SAAU,IAAM,oBACjCH,sBAAuB,CAAEG,SAAU,IAAM,6BACzCF,oBAAqB,CAAEE,SAAU,IAAM,sCACvCD,4BAA6B,CAAEC,SAAU,IAAM,2CAGjD,GAEEC,SAAU,CAAC,CAAC,EAAGjB,GACfkB,WAAY,CAACjB,EAAOG,EAAYG,EA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7D,gCAwBjE4G,EAAuBC,GAAS,SACvCA,sIASOC,EAAmBD,GAAS,SACnCA,6GAOOE,EAAoBF,GAAS,SACpCA,mBACAA,wBACAA,mEAKOG,EAAwB,CAACH,EAAMI,EAAM,UAAY,SACxDJ,iBAAoBI,2BACvBJ,iBAAoBI,gDAgBVC,EAA8B,IAAM,uGAOpCC,EAA2BN,GAAS,SAC3CA,8DAKOO,EAAyCP,GAAS,SACzDA,oEAKOQ,EAAsB,CAACR,EAAMhD,IAAe,SACnD+C,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMhD,IAAe,SAClDgD,kCACAA,8CACAA,wCACAA,yCACAA,0EACiChD,EAAWzE,wDAClByE,EAAWlE,oBAAoBkE,EAAWjF,wCA4BpE0I,CAAmBT,EAAMhD,WACzBuD,EAAsCP,WAnFV,CAACA,GAAS,SACtCA,yCAmFAU,CAAmBV,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAW,CAAkBX,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAY,CAAiCZ,OAM1Ba,EAA2Bb,GAAS,4ZAiB3CA,yJAQOc,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioGroupClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\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\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\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: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n};\n","import { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n proxyInputMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('radio-button');\n\nconst customMixin = (superclass) =>\n class CustomMixin extends superclass {\n constructor() {\n super();\n\n this.baseElement.checkValidity = () => {};\n }\n\n init() {\n // we are forwarding vaadin checked-changed event\n this.baseElement.addEventListener('checked-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent(\n 'checked-changed',\n { detail: e.detail },\n { bubbles: true, composed: true }\n )\n );\n });\n\n super.init?.();\n\n observeChildren(this, this.renderLabel.bind(this));\n }\n\n renderLabel() {\n this.baseElement.setAttribute('label', this.textContent);\n }\n\n get value() {\n return this.getAttribute('value');\n }\n };\n\nexport const RadioButtonClass = compose(\n createStyleMixin({\n mappings: {\n cursor: [{}, { selector: 'label' }],\n fontSize: [{ selector: 'label' }, {}],\n labelTextColor: { selector: 'label', property: 'color' },\n fontFamily: { selector: 'label' },\n radioSize: [\n { selector: '::part(radio)', property: 'height' },\n { selector: '::part(radio)', property: 'width' },\n ],\n radioBackgroundColor: { selector: '::part(radio)', property: 'background-color' },\n radioMargin: { selector: '::part(radio)', property: 'margin' },\n radioCheckedSize: { selector: '::part(radio)::after', property: 'border-width' },\n radioCheckedColor: { selector: '::part(radio)::after', property: 'border-color' },\n radioBorderColor: { selector: '::part(radio)', property: 'border-color', fallback: 'none' },\n radioBorderWidth: { selector: '::part(radio)', property: 'border-width', fallback: 0 },\n radioBorderStyle: { selector: '::part(radio)', property: 'border-style', fallback: 'solid' },\n },\n }),\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [''],\n wrappedEleName: 'vaadin-radio-button',\n excludeAttrsSync: ['tabindex', 'data'],\n includeForwardProps: ['checked', 'name', 'disabled'],\n componentName,\n })\n);\n","import { compose } from '../../helpers';\nimport {\n forwardAttrs,\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '../../helpers/componentHelpers';\nimport { resetInputLabelPosition } from '../../helpers/themeHelpers/resetHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n proxyInputMixin,\n} from '../../mixins';\nimport textFieldMappings from '../descope-text-field/textFieldMappings';\nimport { componentName as childNodeName, RadioButtonClass } from './RadioButtonClass';\n\nexport const componentName = getComponentName('radio-group');\n\nconst RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends superclass {\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ value, label }) =>\n `<descope-radio-button value=\"${value}\">${label}</descope-radio-button>`;\n\n #data;\n\n constructor() {\n super();\n\n // we are overriding vaadin children getter so it will run on our custom elements\n Object.defineProperty(this.baseElement, 'children', {\n get: () => this.querySelectorAll(childNodeName),\n });\n\n // we are overriding vaadin __filterRadioButtons so it will run on our custom elements\n this.baseElement.__filterRadioButtons = (nodes) => {\n return nodes.filter((node) => node.localName === childNodeName);\n };\n\n // vaadin radio group missing some input properties\n this.baseElement.setCustomValidity = () => {};\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n get size() {\n return this.getAttribute('size');\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('could not parse data string from attribute \"data\" - ', e.message);\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 get defaultValue() {\n return this.getAttribute('default-value');\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?.((acc, item) => acc + (this.#renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.inputElement = this.baseElement;\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n Object.defineProperty(this.baseElement, 'validity', {\n get: () => {\n return { valueMissing: !this.baseElement.checkValidity() };\n },\n });\n\n forwardAttrs(this, this.baseElement, {\n includeAttrs: ['layout'],\n mapAttrs: { layout: 'theme' },\n });\n\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n\n observeAttributes(\n this,\n () => {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n },\n {\n includeAttrs: ['size'],\n }\n );\n }\n };\n\nexport const RadioGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...textFieldMappings,\n buttonsSpacing: { selector: '::part(group-field)', property: 'justify-content' },\n buttonsRowGap: { selector: '::part(group-field)', property: 'row-gap' },\n buttonsColumnGap: { selector: '::part(group-field)', property: 'column-gap' },\n itemsLabelColor: {\n selector: () => `::slotted(${RadioButtonClass.componentName})`,\n property: RadioButtonClass.cssVarList.labelTextColor,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n RadioGroupMixin\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-radio-group',\n style: () => `\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${resetInputLabelPosition('vaadin-radio-group')}\n `,\n\n excludeAttrsSync: ['tabindex', 'size', 'data', 'direction'],\n componentName,\n includeForwardProps: ['value'],\n })\n);\n","import { componentName as groupComponentName, RadioGroupClass } from './RadioGroupClass';\nimport { componentName as buttonComponentName, RadioButtonClass } from './RadioButtonClass';\nimport '@vaadin/radio-group';\n\ncustomElements.define(groupComponentName, RadioGroupClass);\ncustomElements.define(buttonComponentName, RadioButtonClass);\n\nexport { RadioGroupClass, groupComponentName as componentName };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","fontSize","fontFamily","labelFontSize","property","labelFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputOutlineWidth","inputOutlineOffset","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","componentName","RadioButtonClass","mappings","cursor","radioSize","radioBackgroundColor","radioMargin","radioCheckedSize","radioCheckedColor","radioBorderColor","fallback","radioBorderWidth","radioBorderStyle","proxyProps","superclass","constructor","super","this","baseElement","checkValidity","init","addEventListener","e","dispatchEvent","CustomEvent","detail","bubbles","composed","renderLabel","bind","setAttribute","textContent","value","getAttribute","slots","wrappedEleName","excludeAttrsSync","includeForwardProps","RadioGroupClass","textFieldMappings","buttonsSpacing","buttonsRowGap","buttonsColumnGap","itemsLabelColor","cssVarList","Object","defineProperty","get","querySelectorAll","__filterRadioButtons","nodes","filter","node","localName","setCustomValidity","items","shadowRoot","querySelector","assignedElements","size","data","dataAttr","JSON","parse","isValidDataType","console","error","message","renderItems","defaultValue","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","inputElement","includeAttrs","valueMissing","mapAttrs","layout","setTimeout","addedNodes","forEach","style","customElements","define","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabel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,SACnD+C,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMhD,IAAe,SAClDgD,kCACAA,8CACAA,wCACAA,yCACAA,0EACiChD,EAAWzE,wDAClByE,EAAWlE,oBAAoBkE,EAAWlF,wCA4BpE2I,CAAmBT,EAAMhD,WACzBuD,EAAsCP,WAnFV,CAACA,GAAS,SACtCA,yCAmFAU,CAAmBV,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAW,CAAkBX,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAY,CAAiCZ,OAM1Ba,EAA2Bb,GAAS,4ZAiB3CA,yJAQOc,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioGroupClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\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\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\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: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n};\n","import { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n proxyInputMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('radio-button');\n\nconst customMixin = (superclass) =>\n class CustomMixin extends superclass {\n constructor() {\n super();\n\n this.baseElement.checkValidity = () => {};\n }\n\n init() {\n // we are forwarding vaadin checked-changed event\n this.baseElement.addEventListener('checked-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent(\n 'checked-changed',\n { detail: e.detail },\n { bubbles: true, composed: true }\n )\n );\n });\n\n super.init?.();\n\n observeChildren(this, this.renderLabel.bind(this));\n }\n\n renderLabel() {\n this.baseElement.setAttribute('label', this.textContent);\n }\n\n get value() {\n return this.getAttribute('value');\n }\n };\n\nexport const RadioButtonClass = compose(\n createStyleMixin({\n mappings: {\n cursor: [{}, { selector: 'label' }],\n fontSize: [{ selector: 'label' }, {}],\n labelTextColor: { selector: 'label', property: 'color' },\n fontFamily: { selector: 'label' },\n radioSize: [\n { selector: '::part(radio)', property: 'height' },\n { selector: '::part(radio)', property: 'width' },\n ],\n radioBackgroundColor: { selector: '::part(radio)', property: 'background-color' },\n radioMargin: { selector: '::part(radio)', property: 'margin' },\n radioCheckedSize: { selector: '::part(radio)::after', property: 'border-width' },\n radioCheckedColor: { selector: '::part(radio)::after', property: 'border-color' },\n radioBorderColor: { selector: '::part(radio)', property: 'border-color', fallback: 'none' },\n radioBorderWidth: { selector: '::part(radio)', property: 'border-width', fallback: 0 },\n radioBorderStyle: { selector: '::part(radio)', property: 'border-style', fallback: 'solid' },\n },\n }),\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [''],\n wrappedEleName: 'vaadin-radio-button',\n excludeAttrsSync: ['tabindex', 'data'],\n includeForwardProps: ['checked', 'name', 'disabled'],\n componentName,\n })\n);\n","import { compose } from '../../helpers';\nimport {\n forwardAttrs,\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '../../helpers/componentHelpers';\nimport { resetInputLabelPosition } from '../../helpers/themeHelpers/resetHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n proxyInputMixin,\n} from '../../mixins';\nimport textFieldMappings from '../descope-text-field/textFieldMappings';\nimport { componentName as childNodeName, RadioButtonClass } from './RadioButtonClass';\n\nexport const componentName = getComponentName('radio-group');\n\nconst RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends superclass {\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ value, label }) =>\n `<descope-radio-button value=\"${value}\">${label}</descope-radio-button>`;\n\n #data;\n\n constructor() {\n super();\n\n // we are overriding vaadin children getter so it will run on our custom elements\n Object.defineProperty(this.baseElement, 'children', {\n get: () => this.querySelectorAll(childNodeName),\n });\n\n // we are overriding vaadin __filterRadioButtons so it will run on our custom elements\n this.baseElement.__filterRadioButtons = (nodes) => {\n return nodes.filter((node) => node.localName === childNodeName);\n };\n\n // vaadin radio group missing some input properties\n this.baseElement.setCustomValidity = () => {};\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n get size() {\n return this.getAttribute('size');\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('could not parse data string from attribute \"data\" - ', e.message);\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 get defaultValue() {\n return this.getAttribute('default-value');\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?.((acc, item) => acc + (this.#renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.inputElement = this.baseElement;\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n Object.defineProperty(this.baseElement, 'validity', {\n get: () => {\n return { valueMissing: !this.baseElement.checkValidity() };\n },\n });\n\n forwardAttrs(this, this.baseElement, {\n includeAttrs: ['layout'],\n mapAttrs: { layout: 'theme' },\n });\n\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n\n observeAttributes(\n this,\n () => {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n },\n {\n includeAttrs: ['size'],\n }\n );\n }\n };\n\nexport const RadioGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...textFieldMappings,\n buttonsSpacing: { selector: '::part(group-field)', property: 'justify-content' },\n buttonsRowGap: { selector: '::part(group-field)', property: 'row-gap' },\n buttonsColumnGap: { selector: '::part(group-field)', property: 'column-gap' },\n itemsLabelColor: {\n selector: () => `::slotted(${RadioButtonClass.componentName})`,\n property: RadioButtonClass.cssVarList.labelTextColor,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n RadioGroupMixin\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-radio-group',\n style: () => `\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${resetInputLabelPosition('vaadin-radio-group')}\n `,\n\n excludeAttrsSync: ['tabindex', 'size', 'data', 'direction'],\n componentName,\n includeForwardProps: ['value'],\n })\n);\n","import { componentName as groupComponentName, RadioGroupClass } from './RadioGroupClass';\nimport { componentName as buttonComponentName, RadioButtonClass } from './RadioButtonClass';\nimport '@vaadin/radio-group';\n\ncustomElements.define(groupComponentName, RadioGroupClass);\ncustomElements.define(buttonComponentName, RadioButtonClass);\n\nexport { RadioGroupClass, groupComponentName as componentName };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","fontSize","fontFamily","labelFontSize","property","labelFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputOutlineWidth","inputOutlineOffset","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","componentName","RadioButtonClass","mappings","cursor","radioSize","radioBackgroundColor","radioMargin","radioCheckedSize","radioCheckedColor","radioBorderColor","fallback","radioBorderWidth","radioBorderStyle","proxyProps","superclass","constructor","super","this","baseElement","checkValidity","init","addEventListener","e","dispatchEvent","CustomEvent","detail","bubbles","composed","renderLabel","bind","setAttribute","textContent","value","getAttribute","slots","wrappedEleName","excludeAttrsSync","includeForwardProps","RadioGroupClass","textFieldMappings","buttonsSpacing","buttonsRowGap","buttonsColumnGap","itemsLabelColor","cssVarList","Object","defineProperty","get","querySelectorAll","__filterRadioButtons","nodes","filter","node","localName","setCustomValidity","items","shadowRoot","querySelector","assignedElements","size","data","dataAttr","JSON","parse","isValidDataType","console","error","message","renderItems","defaultValue","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","inputElement","includeAttrs","valueMissing","mapAttrs","layout","setTimeout","addedNodes","forEach","style","customElements","define","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/*! For license information please see descope-scopes-list-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1674,4838,7362,7640],{3274:(t,e,n)=>{n.r(e);var r=n(41813);customElements.define(r.T,r.A)},3393:(t,e,n)=>{n.d(e,{y:()=>a});var r=n(9696),o=n(79365),i=n(81365);const a=(...t)=>(0,r.Zz)(o.XX,o._$,o.yF,o.jd)((0,i.q)(...t))},18330:(t,e,n)=>{n.d(e,{f:()=>o});var r=n(44099);class o extends r.r{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},18708:(t,e,n)=>{n.r(e),n.d(e,{ListClass:()=>h,componentName:()=>c});var r=n(79365),o=n(81365),i=n(9696),a=n(97810),s=n(25964);const l=(0,a.xE)("list-item"),d=(0,i.Zz)((0,r.RF)({mappings:{padding:{},backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),r.VO,r.tQ,(t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <slot></slot>\n ",(0,s.fz)("\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n ",this)}}),(t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",(t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",(()=>this.removeAttribute("active")),{once:!0})}))}}))((0,o.q)({componentName:l,baseSelector:"slot"})),c=(0,a.xE)("list");class p extends((0,o.q)({componentName:c,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t',(0,s.fz)('\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#t(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#e(){this.items.forEach((t=>{let e=t;e.localName!==d.componentName&&(e=t.querySelector(d.componentName));const n="tiles"===this.variant?"tile":"row";e.setAttribute("variant",n)}))}init(){super.init?.(),(0,a.Ge)(this,(()=>{this.#t(),this.#e(),this.#n()}))}get isReadOnly(){return"true"===this.getAttribute("readonly")}#n(){this.items.forEach((t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("variant"===t?this.#e():"readonly"===t&&this.#n())}}const h=(0,i.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),r.VO,r.tQ)(p);customElements.define(c,h),customElements.define(l,d)},19847:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(97810),o=n(41813);const i=t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.q)(this.inputElement,this,["checked"]),(0,r.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},33713:(t,e,n)=>{n.r(e),n.d(e,{ScopesListClass:()=>b,componentName:()=>p});var r=n(25964),o=n(81365),i=n(9696),a=n(97810),s=n(79365),l=n(72203),d=n(64321),c=n(83150);const p=(0,a.xE)("scopes-list"),h=["checkbox","switch"];class u extends((0,o.q)({componentName:p,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,r.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get isReadOnly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"sm"}#r(){return Array.from(this.shadowRoot.querySelector("div").children)}reportValidity(){this.checkValidity()}checkValidity(){return this.data.every((t=>!t.required||this.value.includes(t.id)))}get value(){return this.#r().filter((t=>t.checked)).map((t=>t.getAttribute("data-id")))}set value(t=[]){this.#r().forEach((e=>{e.checked=t.includes(e.getAttribute("data-id"))}))}get variant(){const t=this.getAttribute("variant");return h.includes(t)?t:h[0]}}const b=(0,i.Zz)((0,s.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>d.q.componentName,property:d.q.cssVarList.hostDirection},{selector:()=>c.H.componentName,property:c.H.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},requiredInputBorderColor:[{selector:`${d.q.componentName}[required="true"]`,property:d.q.cssVarList.inputBorderColor},{selector:`${c.H.componentName}[required="true"]`,property:c.H.cssVarList.inputBorderColor}],requiredInputValueTextColor:[{selector:`${d.q.componentName}[required="true"]`,property:d.q.cssVarList.inputValueTextColor},{selector:`${c.H.componentName}[required="true"]`,property:c.H.cssVarList.knobColor}]}}),(0,l.t)({itemRenderer:({id:t,desc:e,required:n=!1},r,o)=>{const i="checkbox"===o.variant?d.q:c.H;return`\n <${i.componentName}\n bordered="true"\n size=${o.size}\n label="${e}"\n data-id="${t}"\n readonly="${n||o.isReadOnly}"\n required="${n}"\n checked="true"\n ></${i.componentName}>\n`},rerenderAttrsList:["size","variant"]}),s.VO,s.tQ)(u);n(18708),n(49582),customElements.define(p,b)},41813:(t,e,n)=>{n.d(e,{A:()=>l,T:()=>i});var r=n(3393),o=n(97810);const i=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.y)({componentName:i,baseSelector:"div"}),l=class extends s{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(t){this.checkbox.checked=t}get checked(){return this.value}set checked(t){this.value=t}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.EA)(this,this.checkbox,{includeAttrs:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(t,e,n)=>{n.d(e,{A:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(73551).X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},49582:(t,e,n)=>{n.r(e),n.d(e,{CheckboxClass:()=>r.q,componentName:()=>r.T});var r=n(64321);n(67468),n(11284),n(3274),customElements.define(r.T,r.q)},64321:(t,e,n)=>{n.d(e,{T:()=>d,q:()=>f});var r=n(97810),o=n(9696),i=n(79365),a=n(19847),s=n(47507),l=n(73551);const d=(0,r.xE)("checkbox"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,h,b],fontFamily:[b,y,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...p,property:"font-size"}]}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n ${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}))},72203:(t,e,n)=>{n.d(e,{t:()=>a});var r=n(97810);const o=()=>!0,i=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=i,validateSchema:e=o,slotName:n,rerenderAttrsList:a=[]})=>o=>class extends o{#o=[];#i(t){if(!e)return!0;const n=e(t);return!0===n||(console.error("Data schema validation failed",n||""),!1)}#a(){const t=n?`*[slot="${n}"]`:":not([slot])";this.baseElement.querySelectorAll(t).forEach((t=>t.remove()))}#s(){this.#a(),this.data.forEach(((e,n)=>{const r="string"==typeof(o=t(e,n,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(o).content:o instanceof HTMLTemplateElement?o.content:(console.error("Invalid template",o),null);var o;this.baseElement.appendChild(r?.cloneNode(!0))}))}set data(t){this.#i(t)&&(this.#o=t,this.#s())}get data(){return this.#o}init(){super.init?.(),(0,r.mx)(this,(t=>{t.includes("data")?this.#l():this.#s()}),{includeAttrs:[...a,"data"]})}#l(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},73551:(t,e,n)=>{n.d(e,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>p,Qv:()=>i,X6:()=>l,cy:()=>r,fu:()=>d,kG:()=>c,lS:()=>s,zm:()=>o});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${s(t)}\n ${i(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},83150:(t,e,n)=>{n.d(e,{H:()=>f,T:()=>d});var r=n(97810),o=n(9696),i=n(79365),a=n(19847),s=n(47507),l=n(73551);const d=(0,r.xE)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,b,b],fontFamily:[b,y,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...u,property:"font-size"},{...h,property:"height"}],knobSize:[{...u,property:"width"},{...u,property:"height"}],knobTextColor:{...u,property:"color"},knobRadius:{...u,property:"border-radius"},knobTransitionDuration:{...u,property:"transition"},knobColor:{...u,property:"background-color"},knobTopOffset:{...u,property:"top"},knobLeftOffset:{...u,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n\t\t\t${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex"],componentName:d}))}}]);
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1674,4838,7362,7640],{3274:(e,t,n)=>{n.r(t);var r=n(41813);customElements.define(r.T,r.A)},3393:(e,t,n)=>{n.d(t,{y:()=>a});var r=n(9696),o=n(79365),i=n(81365);const a=(...e)=>(0,r.Zz)(o.XX,o._$,o.yF,o.jd)((0,i.q)(...e))},18330:(e,t,n)=>{n.d(t,{f:()=>o});var r=n(44099);class o extends r.r{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},18708:(e,t,n)=>{n.r(t),n.d(t,{ListClass:()=>h,componentName:()=>c});var r=n(79365),o=n(81365),i=n(9696),a=n(97810),s=n(25964);const l=(0,a.xE)("list-item"),d=(0,i.Zz)((0,r.RF)({mappings:{padding:{},backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),r.VO,r.tQ,(e=>class extends e{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <slot></slot>\n ",(0,s.fz)("\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n ",this)}}),(e=>class extends e{init(){super.init?.(),this.baseElement.addEventListener("mousedown",(e=>{e.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",(()=>this.removeAttribute("active")),{once:!0})}))}}))((0,o.q)({componentName:l,baseSelector:"slot"})),c=(0,a.xE)("list");class p extends((0,o.q)({componentName:c,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t',(0,s.fz)('\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#e(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#t(){this.items.forEach((e=>{let t=e;t.localName!==d.componentName&&(t=e.querySelector(d.componentName));const n="tiles"===this.variant?"tile":"row";t.setAttribute("variant",n)}))}init(){super.init?.(),(0,a.Ge)(this,(()=>{this.#e(),this.#t(),this.#n()}))}get isReadOnly(){return"true"===this.getAttribute("readonly")}#n(){this.items.forEach((e=>{this.isReadOnly?e.setAttribute("inert",""):e.removeAttribute("inert")}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),n!==t&&("variant"===e?this.#t():"readonly"===e&&this.#n())}}const h=(0,i.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),r.VO,r.tQ)(p);customElements.define(c,h),customElements.define(l,d)},19847:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97810),o=n(41813);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.q)(this.inputElement,this,["checked"]),(0,r.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},33713:(e,t,n)=>{n.r(t),n.d(t,{ScopesListClass:()=>b,componentName:()=>p});var r=n(25964),o=n(81365),i=n(9696),a=n(97810),s=n(79365),l=n(72203),d=n(64321),c=n(83150);const p=(0,a.xE)("scopes-list"),h=["checkbox","switch"];class u extends((0,o.q)({componentName:p,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,r.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get isReadOnly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"sm"}#r(){return Array.from(this.shadowRoot.querySelector("div").children)}reportValidity(){this.checkValidity()}checkValidity(){return this.data.every((e=>!e.required||this.value.includes(e.id)))}get value(){return this.#r().filter((e=>e.checked)).map((e=>e.getAttribute("data-id")))}set value(e=[]){this.#r().forEach((t=>{t.checked=e.includes(t.getAttribute("data-id"))}))}get variant(){const e=this.getAttribute("variant");return h.includes(e)?e:h[0]}}const b=(0,i.Zz)((0,s.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>d.q.componentName,property:d.q.cssVarList.hostDirection},{selector:()=>c.H.componentName,property:c.H.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},requiredInputBorderColor:[{selector:`${d.q.componentName}[required="true"]`,property:d.q.cssVarList.inputBorderColor},{selector:`${c.H.componentName}[required="true"]`,property:c.H.cssVarList.inputBorderColor}],requiredInputValueTextColor:[{selector:`${d.q.componentName}[required="true"]`,property:d.q.cssVarList.inputValueTextColor},{selector:`${c.H.componentName}[required="true"]`,property:c.H.cssVarList.knobColor}]}}),(0,l.t)({itemRenderer:({id:e,desc:t,required:n=!1},r,o)=>{const i="checkbox"===o.variant?d.q:c.H;return`\n <${i.componentName}\n bordered="true"\n size=${o.size}\n label="${t}"\n data-id="${e}"\n readonly="${n||o.isReadOnly}"\n required="${n}"\n checked="true"\n ></${i.componentName}>\n`},rerenderAttrsList:["size","variant"]}),s.VO,s.tQ)(u);n(18708),n(49582),customElements.define(p,b)},41813:(e,t,n)=>{n.d(t,{A:()=>l,T:()=>i});var r=n(3393),o=n(97810);const i=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.y)({componentName:i,baseSelector:"div"}),l=class extends s{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.EA)(this,this.checkbox,{includeAttrs:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(e,t,n)=>{n.d(t,{A:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(73551).X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},49582:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>r.q,componentName:()=>r.T});var r=n(64321);n(67468),n(11284),n(3274),customElements.define(r.T,r.q)},64321:(e,t,n)=>{n.d(t,{T:()=>d,q:()=>f});var r=n(97810),o=n(9696),i=n(79365),a=n(19847),s=n(47507),l=n(73551);const d=(0,r.xE)("checkbox"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,h,b],fontFamily:[b,y,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},errorMessageFontSize:{...g,property:"font-size"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...p,property:"font-size"}]}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n ${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}))},72203:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(97810);const o=()=>!0,i=e=>`<pre>${JSON.stringify(e,null,4)}</pre>`,a=({itemRenderer:e=i,validateSchema:t=o,slotName:n,rerenderAttrsList:a=[]})=>o=>class extends o{#o=[];#i(e){if(!t)return!0;const n=t(e);return!0===n||(console.error("Data schema validation failed",n||""),!1)}#a(){const e=n?`*[slot="${n}"]`:":not([slot])";this.baseElement.querySelectorAll(e).forEach((e=>e.remove()))}#s(){this.#a(),this.data.forEach(((t,n)=>{const r="string"==typeof(o=e(t,n,this))?(e=>{const t=document.createElement("template");return t.innerHTML=e,t})(o).content:o instanceof HTMLTemplateElement?o.content:(console.error("Invalid template",o),null);var o;this.baseElement.appendChild(r?.cloneNode(!0))}))}set data(e){this.#i(e)&&(this.#o=e,this.#s())}get data(){return this.#o}init(){super.init?.(),(0,r.mx)(this,(e=>{e.includes("data")?this.#l():this.#s()}),{includeAttrs:[...a,"data"]})}#l(){const e=this.getAttribute("data");if(e)try{this.data=JSON.parse(e)}catch(t){console.warn("Invalid JSON data",e)}}}},73551:(e,t,n)=>{n.d(t,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>p,Qv:()=>i,X6:()=>l,cy:()=>r,fu:()=>d,kG:()=>c,lS:()=>s,zm:()=>o});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,p=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${s(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,h=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},83150:(e,t,n)=>{n.d(t,{H:()=>f,T:()=>d});var r=n(97810),o=n(9696),i=n(79365),a=n(19847),s=n(47507),l=n(73551);const d=(0,r.xE)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:g}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,b,b],fontFamily:[b,y,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},errorMessageFontSize:{...g,property:"font-size"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...u,property:"font-size"},{...h,property:"height"}],knobSize:[{...u,property:"width"},{...u,property:"height"}],knobTextColor:{...u,property:"color"},knobRadius:{...u,property:"border-radius"},knobTransitionDuration:{...u,property:"transition"},knobColor:{...u,property:"background-color"},knobTopOffset:{...u,property:"top"},knobLeftOffset:{...u,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n\t\t\t${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex"],componentName:d}))}}]);
|
3
3
|
//# sourceMappingURL=descope-scopes-list-index-js.js.map
|