@descope/web-components-ui 2.2.1 → 2.2.2
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 +6 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/9582.js +1 -1
- package/dist/umd/9582.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-boolean-field-internal-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/package.json +28 -28
- package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +1 -6
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-fields-descope-boolean-field-internal-index-js.js","mappings":"8JAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,
|
|
1
|
+
{"version":3,"file":"boolean-fields-descope-boolean-field-internal-index-js.js","mappings":"8JAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,oECZhB,MAAMC,GAAgB,QAAiB,0BAExCC,EAAoB,CAAC,WAAY,UAAW,YAE5CC,GAAiB,OAAqB,CAAEF,gBAAeG,aAAc,QA4F3E,EA1FA,cAAmCD,EACjC,6BAAWE,GACT,MAAO,CAAC,WAAY,QACtB,CAEA,WAAAC,GACEC,QACAC,KAAKC,UAAY,yMAOjBD,KAAKE,WAAaF,KAAKG,cAAc,OACrCH,KAAKI,SAAWJ,KAAKG,cAAc,mBACnCH,KAAKK,aAAeL,KAAKG,cAAc,iBACzC,CAEA,SAAIG,GACF,OAAON,KAAKI,UAAUG,OACxB,CAEA,SAAID,CAAME,GACRR,KAAKI,SAASG,QAAUC,CAC1B,CAEA,WAAID,GACF,OAAOP,KAAKM,KACd,CAEA,WAAIC,CAAQC,GACVR,KAAKM,MAAQE,CACf,CAEA,IAAAC,GACET,KAAKU,iBAAiB,QAAUC,IAC1BA,EAAEC,WACJZ,KAAKI,SAASS,UAGlBd,MAAMU,UAEN,QAAaT,KAAMA,KAAKI,SAAU,CAAEU,aAAcpB,KAClD,QAAUM,KAAMA,KAAKI,SAAU,CAAEU,aAAc,CAAC,aAGhDd,KAAKK,aAAaK,iBAAiB,QAAUC,IACtCX,KAAKe,aAAa,aAAgBf,KAAKe,aAAa,aACvDf,KAAKI,SAASY,UAKlBhB,KAAKiB,6BAA6B,CAACjB,KAAKI,UAC1C,CAEA,wBAAAc,CAAyBC,EAAUC,EAAUC,GAC3CtB,MAAMmB,2BAA2BC,EAAUC,EAAUC,GAEpC,aAAbF,GACFnB,KAAKsB,iBAA8B,OAAbD,GAGP,UAAbF,GACFnB,KAAKuB,eAET,CAEA,aAAAA,GACE,MAAMC,EAAaxB,KAAKyB,aAAa,SAEnCzB,KAAKK,aAAaqB,YADhBF,GAG8B,EAEpC,CAEA,gBAAAF,CAAiBd,GACfR,KAAK2B,YAAYC,aAAa,QAASpB,EACzC,CAEA,WAAAqB,GACE,OAAI7B,KAAK8B,aAAe9B,KAAKM,MACpB,CAAEyB,cAAc,GAElB,CAAC,CACV,E","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly', 'label'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class=\"label-content\" slot=\"label\"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n this.labelContent = this.querySelector('.label-content');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // Handle label click to toggle checkbox\n this.labelContent.addEventListener('click', (e) => {\n if (!this.hasAttribute('disabled') && !this.hasAttribute('readonly')) {\n this.checkbox.click();\n }\n });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n\n if (attrName === 'label') {\n this.onLabelChange();\n }\n }\n\n onLabelChange() {\n const labelValue = this.getAttribute('label');\n if (labelValue) {\n this.labelContent.textContent = labelValue;\n } else {\n this.labelContent.textContent = '';\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n"],"names":["customElements","define","createBaseInputClass","args","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","constructor","super","this","innerHTML","wrapperEle","querySelector","checkbox","labelContent","value","checked","val","init","addEventListener","e","isTrusted","focus","includeAttrs","hasAttribute","click","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","onLabelChange","labelValue","getAttribute","textContent","baseElement","setAttribute","getValidity","isRequired","valueMissing"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-fields-descope-switch-toggle-index-js.js","mappings":";uLAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,kDCLhB,MAAMC,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,6DC3BK,MAAMC,EAAqBC,GAChC,cAAqCA,EACnC,IAAAC,GACEZ,MAAMY,SAEN,MAAMC,EAAWC,SAASC,cAAc,YACxCF,EAASG,UAAY,cACpB,oEAGE,eAGHT,KAAKU,YAAYC,YAA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tE,SAAU,iBACzC2G,kBAAmB,IAAKrC,EAAOtE,SAAU,oBAG7C,MACA,QAAgB,CAAE4G,WAAY,CAAC,QAAS,oBACxC,KACA,IA1D+B,EA4D/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBpH,MAAO,IAAM,YACZ,OAAamF,EAAkBhG,uBAC/B,QAAuBgG,EAAkBhG,+/BAsD1CkI,iBAAkB,CAAC,QAAS,WAAY,SACxC9J,kB","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '@descope-ui/descope-enriched-text';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport {\n forwardAttrs,\n observeAttributes,\n getComponentName,\n syncAttrs,\n} from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly', 'label'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class=\"label-content\" slot=\"label\"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n this.labelContent = this.querySelector('.label-content');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // Handle label click to toggle checkbox\n this.labelContent.addEventListener('click', (e) => {\n if (!this.hasAttribute('disabled') && !this.hasAttribute('readonly')) {\n this.checkbox.click();\n }\n });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n\n if (attrName === 'label') {\n this.onLabelChange();\n }\n }\n\n onLabelChange() {\n const labelValue = this.getAttribute('label');\n if (labelValue) {\n this.labelContent.textContent = labelValue;\n } else {\n this.labelContent.textContent = '';\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default (cssVarList) => `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\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\ndescope-enriched-text[empty] {\n\t${EnrichedTextClass.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${EnrichedTextClass.cssVarList.hostDirection}: var(${cssVarList.hostDirection});\n}\n\n`;\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n this.contentNode.firstChild?.setAttribute('part', 'content');\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: {\n selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::part(content)::after',\n },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\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 trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles(SwitchToggleClass.cssVarList)}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.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`,\n excludeAttrsSync: ['label', 'tabindex', 'style'],\n componentName,\n })\n);\n"],"names":["customElements","define","createBaseInputClass","args","InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","booleanFieldMixin","superclass","init","template","document","createElement","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","checkbox","includeAttrs","disableRules","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","wrapperEle","labelContent","checked","val","addEventListener","e","isTrusted","focus","hasAttribute","click","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","onLabelChange","labelValue","getAttribute","textContent","getValidity","isRequired","valueMissing","cssVarList","hostDisplay","hostDirection","decodeHTML","html","textArea","RawText","attachShadow","mode","hideWhenEmpty","hasChildren","childNodes","length","style","display","selector","TextClass","mappings","hostWidth","property","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cursor","EnrichedText","bind","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","removeAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","EnrichedTextClass","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","component","checkboxElement","track","checkboxSurface","knob","checkboxLabel","requiredIndicator","helperText","errorMessage","SwitchToggleClass","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobColor","knobTopOffset","knobLeftOffset","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","excludeAttrsSync"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"boolean-fields-descope-switch-toggle-index-js.js","mappings":";uLAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC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ACnCgG,YAAa,CACX,IAAKxB,EAAMxE,SAAU,aACrB,IAAKsE,EAAOtE,SAAU,WAGxBiG,SAAU,CACR,IAAKzB,EAAMxE,SAAU,SACrB,IAAKwE,EAAMxE,SAAU,WAEvBkG,cAAe,IAAK1B,EAAMxE,SAAU,SACpCmG,WAAY,IAAK3B,EAAMxE,SAAU,iBACjCoG,uBAAwB,IAAK5B,EAAMxE,SAAU,cAC7CqG,UAAW,IAAK7B,EAAMxE,SAAU,oBAChCsG,cAAe,IAAK9B,EAAMxE,SAAU,OACpCuG,eAAgB,IAAK/B,EAAMxE,SAAU,QAErCwG,kBAAmB,IAAKlC,EAAOtE,SAAU,iBACzCyG,mBAAoB,IAAKnC,EAAOtE,SAAU,kBAC1C0G,kBAAmB,IAAKpC,EAAOtE,SAAU,iBACzC2G,kBAAmB,IAAKrC,EAAOtE,SAAU,oBAG7C,MACA,QAAgB,CAAE4G,WAAY,CAAC,QAAS,oBACxC,KACA,IA1D+B,EA4D/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBpH,MAAO,IAAM,YACZ,OAAamF,EAAkBhG,uBAC/B,QAAuBgG,EAAkBhG,+/BAsD1CkI,iBAAkB,CAAC,QAAS,WAAY,SACxC9J,kB","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '@descope-ui/descope-enriched-text';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly', 'label'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class=\"label-content\" slot=\"label\"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n this.labelContent = this.querySelector('.label-content');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // Handle label click to toggle checkbox\n this.labelContent.addEventListener('click', (e) => {\n if (!this.hasAttribute('disabled') && !this.hasAttribute('readonly')) {\n this.checkbox.click();\n }\n });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n\n if (attrName === 'label') {\n this.onLabelChange();\n }\n }\n\n onLabelChange() {\n const labelValue = this.getAttribute('label');\n if (labelValue) {\n this.labelContent.textContent = labelValue;\n } else {\n this.labelContent.textContent = '';\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default (cssVarList) => `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\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\ndescope-enriched-text[empty] {\n\t${EnrichedTextClass.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${EnrichedTextClass.cssVarList.hostDirection}: var(${cssVarList.hostDirection});\n}\n\n`;\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n this.contentNode.firstChild?.setAttribute('part', 'content');\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: {\n selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::part(content)::after',\n },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\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 trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles(SwitchToggleClass.cssVarList)}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.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`,\n excludeAttrsSync: ['label', 'tabindex', 'style'],\n componentName,\n })\n);\n"],"names":["customElements","define","createBaseInputClass","args","InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","booleanFieldMixin","superclass","init","template","document","createElement","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","checkbox","includeAttrs","disableRules","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","wrapperEle","labelContent","checked","val","addEventListener","e","isTrusted","focus","hasAttribute","click","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","onLabelChange","labelValue","getAttribute","textContent","getValidity","isRequired","valueMissing","cssVarList","hostDisplay","hostDirection","decodeHTML","html","textArea","RawText","attachShadow","mode","hideWhenEmpty","hasChildren","childNodes","length","style","display","selector","TextClass","mappings","hostWidth","property","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cursor","EnrichedText","bind","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","removeAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","EnrichedTextClass","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","component","checkboxElement","track","checkboxSurface","knob","checkboxLabel","requiredIndicator","helperText","errorMessage","SwitchToggleClass","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobColor","knobTopOffset","knobLeftOffset","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","excludeAttrsSync"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/web-components-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"webpack": "^5.79.0",
|
|
51
51
|
"webpack-cli": "^6.0.0",
|
|
52
52
|
"webpack-dev-server": "^5.0.0",
|
|
53
|
-
"rollup-replace-plugin": "2.2.
|
|
54
|
-
"test-drivers": "2.2.
|
|
55
|
-
"webpack-extract-font-loader": "2.2.
|
|
56
|
-
"webpack-replace-plugin": "2.2.
|
|
53
|
+
"rollup-replace-plugin": "2.2.2",
|
|
54
|
+
"test-drivers": "2.2.2",
|
|
55
|
+
"webpack-extract-font-loader": "2.2.2",
|
|
56
|
+
"webpack-replace-plugin": "2.2.2"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@vaadin/checkbox": "24.3.4",
|
|
@@ -77,29 +77,29 @@
|
|
|
77
77
|
"libphonenumber-js": "^1.11.12",
|
|
78
78
|
"lodash.debounce": "4.0.8",
|
|
79
79
|
"lodash.merge": "4.6.2",
|
|
80
|
-
"@descope-ui/common": "2.2.
|
|
81
|
-
"@descope-ui/descope-address-field": "2.2.
|
|
82
|
-
"@descope-ui/descope-apps-list": "2.2.
|
|
83
|
-
"@descope-ui/descope-autocomplete-field": "2.2.
|
|
84
|
-
"@descope-ui/descope-avatar": "2.2.
|
|
85
|
-
"@descope-ui/descope-badge": "2.2.
|
|
86
|
-
"@descope-ui/descope-button": "2.2.
|
|
87
|
-
"@descope-ui/descope-collapsible-container": "2.2.
|
|
88
|
-
"@descope-ui/descope-combo-box": "2.2.
|
|
89
|
-
"@descope-ui/descope-enriched-text": "2.2.
|
|
90
|
-
"@descope-ui/descope-icon": "2.2.
|
|
91
|
-
"@descope-ui/descope-image": "2.2.
|
|
92
|
-
"@descope-ui/descope-link": "2.2.
|
|
93
|
-
"@descope-ui/descope-list": "2.2.
|
|
94
|
-
"@descope-ui/descope-list-item": "2.2.
|
|
95
|
-
"@descope-ui/descope-outbound-app-button": "2.2.
|
|
96
|
-
"@descope-ui/descope-outbound-apps": "2.2.
|
|
97
|
-
"@descope-ui/descope-password-strength": "2.2.
|
|
98
|
-
"@descope-ui/descope-recovery-codes": "2.2.
|
|
99
|
-
"@descope-ui/descope-text": "2.2.
|
|
100
|
-
"@descope-ui/descope-timer": "2.2.
|
|
101
|
-
"@descope-ui/descope-timer-button": "2.2.
|
|
102
|
-
"@descope-ui/descope-trusted-devices": "2.2.
|
|
80
|
+
"@descope-ui/common": "2.2.2",
|
|
81
|
+
"@descope-ui/descope-address-field": "2.2.2",
|
|
82
|
+
"@descope-ui/descope-apps-list": "2.2.2",
|
|
83
|
+
"@descope-ui/descope-autocomplete-field": "2.2.2",
|
|
84
|
+
"@descope-ui/descope-avatar": "2.2.2",
|
|
85
|
+
"@descope-ui/descope-badge": "2.2.2",
|
|
86
|
+
"@descope-ui/descope-button": "2.2.2",
|
|
87
|
+
"@descope-ui/descope-collapsible-container": "2.2.2",
|
|
88
|
+
"@descope-ui/descope-combo-box": "2.2.2",
|
|
89
|
+
"@descope-ui/descope-enriched-text": "2.2.2",
|
|
90
|
+
"@descope-ui/descope-icon": "2.2.2",
|
|
91
|
+
"@descope-ui/descope-image": "2.2.2",
|
|
92
|
+
"@descope-ui/descope-link": "2.2.2",
|
|
93
|
+
"@descope-ui/descope-list": "2.2.2",
|
|
94
|
+
"@descope-ui/descope-list-item": "2.2.2",
|
|
95
|
+
"@descope-ui/descope-outbound-app-button": "2.2.2",
|
|
96
|
+
"@descope-ui/descope-outbound-apps": "2.2.2",
|
|
97
|
+
"@descope-ui/descope-password-strength": "2.2.2",
|
|
98
|
+
"@descope-ui/descope-recovery-codes": "2.2.2",
|
|
99
|
+
"@descope-ui/descope-text": "2.2.2",
|
|
100
|
+
"@descope-ui/descope-timer": "2.2.2",
|
|
101
|
+
"@descope-ui/descope-timer-button": "2.2.2",
|
|
102
|
+
"@descope-ui/descope-trusted-devices": "2.2.2"
|
|
103
103
|
},
|
|
104
104
|
"overrides": {
|
|
105
105
|
"@vaadin/avatar": "24.3.4",
|
package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';
|
|
2
|
-
import {
|
|
3
|
-
forwardAttrs,
|
|
4
|
-
observeAttributes,
|
|
5
|
-
getComponentName,
|
|
6
|
-
syncAttrs,
|
|
7
|
-
} from '../../../helpers/componentHelpers';
|
|
2
|
+
import { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';
|
|
8
3
|
|
|
9
4
|
export const componentName = getComponentName('boolean-field-internal');
|
|
10
5
|
|
|
@@ -21,6 +21,7 @@ const {
|
|
|
21
21
|
checkboxSurface,
|
|
22
22
|
checkboxLabel,
|
|
23
23
|
requiredIndicator,
|
|
24
|
+
checkboxContainer,
|
|
24
25
|
helperText,
|
|
25
26
|
errorMessage,
|
|
26
27
|
} = {
|
|
@@ -72,8 +73,10 @@ export const CheckboxClass = compose(
|
|
|
72
73
|
inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },
|
|
73
74
|
inputOutlineColor: { ...checkboxElement, property: 'outline-color' },
|
|
74
75
|
inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },
|
|
76
|
+
inputAlign: { ...checkboxElement, property: 'align-self' },
|
|
75
77
|
|
|
76
78
|
inputContainerPadding: { ...component, property: 'padding' },
|
|
79
|
+
inputContainerBackgroundColor: { ...component, property: 'background-color' },
|
|
77
80
|
inputContainerBorderRadius: { ...component, property: 'border-radius' },
|
|
78
81
|
inputContainerBorderWidth: { ...component, property: 'border-width' },
|
|
79
82
|
inputContainerBorderColor: { ...component, property: 'border-color' },
|
|
@@ -123,6 +126,10 @@ export const CheckboxClass = compose(
|
|
|
123
126
|
height: 100%;
|
|
124
127
|
}
|
|
125
128
|
|
|
129
|
+
:host([full-width]) vaadin-checkbox {
|
|
130
|
+
flex-grow: 1;
|
|
131
|
+
}
|
|
132
|
+
|
|
126
133
|
vaadin-checkbox::part(checkbox) {
|
|
127
134
|
margin: 0;
|
|
128
135
|
}
|