@descope/web-components-ui 1.109.0 → 1.111.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 +2086 -1839
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2452 -2204
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1995.js +7 -22
- package/dist/umd/1995.js.LICENSE.txt +0 -6
- package/dist/umd/1995.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +3 -3
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-apps-list.js +18 -0
- package/dist/umd/descope-apps-list.js.LICENSE.txt +23 -0
- package/dist/umd/descope-apps-list.js.map +1 -0
- package/dist/umd/descope-avatar.js +17 -1
- package/dist/umd/descope-avatar.js.LICENSE.txt +23 -0
- package/dist/umd/descope-avatar.js.map +1 -1
- package/dist/umd/descope-button.js +4 -4
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-collapsible-container.js +1 -1
- package/dist/umd/descope-collapsible-container.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js.map +1 -1
- package/dist/umd/descope-enriched-text.js +1 -1
- package/dist/umd/descope-enriched-text.js.map +1 -1
- package/dist/umd/descope-icon.js +1 -1
- package/dist/umd/descope-icon.js.map +1 -1
- package/dist/umd/descope-image.js +1 -1
- package/dist/umd/descope-image.js.map +1 -1
- package/dist/umd/descope-link.js +1 -1
- package/dist/umd/descope-link.js.map +1 -1
- package/dist/umd/descope-list-item.js +2 -0
- package/dist/umd/descope-list-item.js.map +1 -0
- package/dist/umd/descope-list.js +2 -0
- package/dist/umd/descope-list.js.map +1 -0
- package/dist/umd/descope-outbound-apps.js +339 -0
- package/dist/umd/descope-outbound-apps.js.LICENSE.txt +5 -0
- package/dist/umd/descope-outbound-apps.js.map +1 -0
- package/dist/umd/descope-recovery-codes.js +1 -1
- package/dist/umd/descope-recovery-codes.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text.js +1 -1
- package/dist/umd/descope-text.js.map +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
- package/dist/umd/descope-timer-button.js +2 -2
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-timer.js +1 -1
- package/dist/umd/descope-timer.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +3 -3
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +4 -4
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +2 -2
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.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/package.json +21 -17
- package/src/components/descope-scopes-list/index.js +2 -1
- package/src/index.cjs.js +0 -3
- package/src/index.js +0 -2
- package/src/theme/components/index.js +5 -3
- package/dist/umd/descope-apps-list-index-js.js +0 -2
- package/dist/umd/descope-apps-list-index-js.js.map +0 -1
- package/dist/umd/descope-list-index-js.js +0 -2
- package/dist/umd/descope-list-index-js.js.map +0 -1
- package/src/components/descope-apps-list/AppsListClass.js +0 -97
- package/src/components/descope-apps-list/index.js +0 -8
- package/src/components/descope-list/ListClass.js +0 -156
- package/src/components/descope-list/ListItemClass.js +0 -58
- package/src/components/descope-list/index.js +0 -7
- package/src/theme/components/appsList.js +0 -36
- package/src/theme/components/list/list.js +0 -56
- package/src/theme/components/list/listItem.js +0 -41
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-apps-list.js","mappings":";2JAgBO,SAASA,EAAqBC,GACnC,MAAMC,EAAS,GAEf,KAAOD,GAAM,CACX,GAAIA,EAAKE,WAAaC,KAAKC,cAAe,CACxCH,EAAOI,KAAKL,GACZ,KACF,CAEIA,EAAKE,WAAaC,KAAKG,uBAOzBN,EADEA,EAAKO,aACAP,EAAKO,aAIPP,EAAKQ,YAVVP,EAAOI,KAAKL,GACZA,EAAOA,EAAKS,KAUhB,CAEA,OAAOR,CACT,CAUO,SAASS,EAAqBV,GACnC,MAAMC,EAAS,GACf,IAAIU,EAQJ,MAPuB,SAAnBX,EAAKY,UACPD,EAAWX,EAAKa,oBAEhBZ,EAAOI,KAAKL,GACZW,EAAW,IAAIX,EAAKc,WAEtBH,EAASI,SAASC,GAASf,EAAOI,QAAQK,EAAqBM,MACxDf,CACT,CAUO,SAASgB,EAAkBC,EAAUlB,GAC1C,OAAKA,EAIEA,EAAKmB,QAAQD,IAAaD,EAAkBC,EAAUlB,EAAKoB,cAAcX,MAHvE,IAIX,CAQO,SAASY,EAA0BC,GACxC,OAAKA,EAIE,IAAIC,IAAID,EAAME,MAAM,MAHlB,IAAID,GAIf,CAQO,SAASE,EAAwBC,GACtC,OAAOA,EAAS,IAAIA,GAAQC,KAAK,KAAO,EAC1C,CASO,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L,KAAKoL,WAAaA,EAElB,MAAMT,EAAc3K,KAAKhD,KACrB2N,IACFA,EAAYS,WAAaA,EAE7B,CAMA,SAAAV,CAAUE,GACR5K,KAAK4K,OAASA,EAEd,MAAMD,EAAc3K,KAAKhD,KACrB2N,IACFA,EAAYC,OAASA,EAEzB,CAGA,cAAAS,GACErL,KAAK4L,cAAc,IAAIC,YAAY,kBAAmB,CAAEC,OAAQ,CAAE9O,KAAMgD,KAAKhD,QAC/E,6FCzJK,MAAM0C,GAAgB,QAAiB,aA4BjCqM,GAAgB,SAC3B,QAAiB,CACf5K,SAAU,CACR6K,QAAS,CAAC,EACVnK,gBAAiB,CAAC,EAClBE,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdH,aAAc,CAAC,EACfmK,QAAS,CAAC,EACV3F,OAAQ,CAAC,EACT1E,IAAK,CAAC,EACNsK,SAAU,CAAEhO,SAAU,IAAM,SAC5BiO,WAAY,CAAC,EACbC,cAAe,CAAC,EAChBC,WAAY,CAAC,KAGjB,KACA,MA7CmB1E,GACnB,cAAiCA,EAC/B,WAAA7H,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,+BAIhD,QACE,uMAWAH,KAEJ,IAwBF,IArB2B,EAsB3B,QAAgB,CAAEN,gBAAeE,aAAc","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/dom-utils.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/ListClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/sizing.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-controller.js","webpack://@descope/web-components-ui/../components/descope-avatar/src/component/AvatarClass.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-apps-list/src/component/AppsListClass.js","webpack://@descope/web-components-ui/../components/descope-apps-list/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/a11y-base/src/focus-mixin.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-avatar/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-observer.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/tooltip-controller.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/ListItemClass.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\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 observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { ListItemClass } from '@descope-ui/descope-list-item/class';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list');\n\nclass RawList extends createBaseClass({ componentName, baseSelector: '.wrapper' }) {\n static get observedAttributes() {\n return ['variant', 'readonly'];\n }\n\n constructor() {\n super();\n\n 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`;\n\n injectStyle(\n `\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 `,\n this\n );\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n #handleEmptyState() {\n if (this.items.length === 0) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n }\n\n get variant() {\n return this.getAttribute('variant') || 'list';\n }\n\n #handleItemsVariant() {\n this.items.forEach((item) => {\n let listItem = item;\n if (listItem.localName !== ListItemClass.componentName) {\n listItem = item.querySelector(ListItemClass.componentName);\n }\n\n const listItemVariant = this.variant === 'tiles' ? 'tile' : 'row';\n listItem.setAttribute('variant', listItemVariant);\n });\n }\n\n init() {\n super.init?.();\n\n // we want new items to get the size\n observeChildren(this, () => {\n this.#handleEmptyState();\n this.#handleItemsVariant();\n this.#handleReadOnly();\n });\n }\n\n get isReadOnly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n #handleReadOnly() {\n this.items.forEach((item) => {\n if (this.isReadOnly) item.setAttribute('inert', '');\n else item.removeAttribute('inert');\n });\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n if (name === 'variant') {\n this.#handleItemsVariant();\n } else if (name === 'readonly') {\n this.#handleReadOnly();\n }\n }\n}\n\nexport const ListClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n maxHeight: { selector: () => ':host' },\n minHeight: {},\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontFamily: {},\n gap: {},\n\n backgroundColor: {},\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n boxShadow: {},\n gridTemplateColumns: {},\n maxItemsWidth: { selector: () => '::slotted(:not([slot]))', property: 'max-width' },\n minItemsWidth: { selector: () => '::slotted(:not([slot]))', property: 'min-width' },\n itemsHorizontalAlign: { selector: () => '::slotted(*)', property: 'justify-self' },\n emptyStateTextColor: { selector: () => 'slot[name=\"empty-state\"]', property: 'color' },\n emptyStateTextFontFamily: {\n selector: () => 'slot[name=\"empty-state\"]',\n property: 'font-family',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawList);\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 */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","import { componentName, ListItemClass } from './ListItemClass';\n\ncustomElements.define(componentName, ListItemClass);\n\nexport { ListItemClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst sizing = css`\n :host {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n`;\n\naddLumoGlobalStyles('sizing-props', sizing);\n\nexport { sizing };\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 { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} slotName\n * @return {string}\n * @protected\n */\n static generateId(host, slotName) {\n const prefix = slotName || 'default';\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.defaultNode = node;\n }\n }\n\n if (node) {\n this.node = node;\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n const newNodes = addedNodes.filter((node) => !isEmptyTextNode(node) && !current.includes(node));\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes && newNodes.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('avatar');\nclass RawAvatar extends createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <vaadin-avatar></vaadin-avatar>\n <div class=\"editableBadge\">\n <vaadin-icon icon=\"vaadin:pencil\"></vaadin-icon>\n </div>\n </div>\n\t\t`;\n\n injectStyle(`\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n `, this);\n\n this.avatarComponent = this.shadowRoot.querySelector('vaadin-avatar');\n\n forwardAttrs(this, this.avatarComponent, {\n includeAttrs: ['display-name', 'img', 'abbr'],\n mapAttrs: { 'display-name': 'name' },\n });\n\n const editableIcon = this.shadowRoot.querySelector('.editableBadge');\n\n observeAttributes(\n this,\n () => {\n editableIcon.style.display = this.isEditable ? '' : 'none';\n },\n { includeAttrs: ['editable'] },\n );\n }\n\n get isEditable() {\n return this.getAttribute('editable') === 'true';\n }\n}\n\nconst { host, editableBadge, avatar } = {\n host: { selector: () => ':host' },\n editableBadge: { selector: '> .editableBadge' },\n avatar: { selector: 'vaadin-avatar' },\n};\n\nexport const AvatarClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [\n { ...host, property: 'width' },\n { ...host, property: 'min-width' },\n ],\n hostHeight: { ...host, property: 'height' },\n cursor: [avatar, host],\n hostDirection: { ...host, property: 'direction' },\n avatarTextColor: { ...avatar, property: 'color' },\n avatarBackgroundColor: { ...avatar, property: 'background-color' },\n editableIconColor: { ...editableBadge, property: 'color' },\n editableBorderColor: { ...editableBadge, property: 'border-color' },\n editableBackgroundColor: {\n ...editableBadge,\n property: 'background-color',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawAvatar);\n","import '@descope-ui/descope-list-item';\n\nimport { componentName, ListClass } from './ListClass';\n\ncustomElements.define(componentName, ListClass);\n\nexport { ListClass, componentName };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName, limitAbbreviation } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n createDynamicDataMixin,\n} from '@descope-ui/common/components-mixins';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('apps-list');\n\nconst itemRenderer = ({ name, icon, url }, _, ref) => `\n <a ${url ? `href=\"${url}\" title=\"${url}\"` : ''} target=\"_blank\">\n <descope-list-item>\n <descope-avatar\n ${icon ? `img=\"${icon}\"` : ''}\n ${name ? `display-name=\"${name}\" abbr=${limitAbbreviation(name)}` : ''}\n size=${ref.size}\n ></descope-avatar>\n <descope-text\n variant=\"body1\"\n mode=\"primary\"\n >${name}</descope-text>\n </descope-list-item>\n </a>\n`;\n\nconst customMixin = (superclass) =>\n class AppsListMixinClass extends superclass {\n get size() {\n return this.getAttribute('size') || 'sm';\n }\n };\n\nexport const AppsListClass = compose(\n createStyleMixin({\n mappings: {\n maxHeight: { selector: () => ':host' },\n minHeight: { selector: () => ':host' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n itemsFontWeight: {\n selector: TextClass.componentName,\n property: TextClass.cssVarList.fontWeight,\n },\n itemsFontSize: {\n selector: TextClass.componentName,\n property: TextClass.cssVarList.fontSize,\n },\n itemsTextAlign: {\n selector: TextClass.componentName,\n property: TextClass.cssVarList.textAlign,\n },\n },\n }),\n createDynamicDataMixin({ itemRenderer, rerenderAttrsList: ['size'] }),\n draggableMixin,\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['empty-state'],\n wrappedEleName: 'descope-list',\n excludeAttrsSync: ['tabindex', 'class', 'empty'],\n componentName,\n style: () => `\n :host {\n width: 100%;\n display: inline-flex;\n }\n\n descope-text::part(text-wrapper) {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n a {\n text-decoration: none;\n }\n\n descope-text {\n ${TextClass.cssVarList.hostDirection}: var(${AppsListClass.cssVarList.hostDirection});\n }\n `,\n })\n);\n","import '@descope-ui/descope-list';\nimport '@descope-ui/descope-avatar';\nimport '@descope-ui/descope-text';\nimport { componentName, AppsListClass } from './AppsListClass';\n\ncustomElements.define(componentName, AppsListClass);\n\nexport { AppsListClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { isKeyboardActive } from './focus-utils.js';\n\n/**\n * A mixin to handle `focused` and `focus-ring` attributes based on focus.\n *\n * @polymerMixin\n */\nexport const FocusMixin = dedupingMixin(\n (superclass) =>\n class FocusMixinClass extends superclass {\n /**\n * @protected\n * @return {boolean}\n */\n get _keyboardActive() {\n return isKeyboardActive();\n }\n\n /** @protected */\n ready() {\n this.addEventListener('focusin', (e) => {\n if (this._shouldSetFocus(e)) {\n this._setFocused(true);\n }\n });\n\n this.addEventListener('focusout', (e) => {\n if (this._shouldRemoveFocus(e)) {\n this._setFocused(false);\n }\n });\n\n // In super.ready() other 'focusin' and 'focusout' listeners might be\n // added, so we call it after our own ones to ensure they execute first.\n // Issue to watch out: when incorrect, <vaadin-combo-box> refocuses the\n // input field on iOS after \"Done\" is pressed.\n super.ready();\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // In non-Chrome browsers, blur does not fire on the element when it is disconnected.\n // reproducible in `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n if (this.hasAttribute('focused')) {\n this._setFocused(false);\n }\n }\n\n /**\n * Override to change how focused and focus-ring attributes are set.\n *\n * @param {boolean} focused\n * @protected\n */\n _setFocused(focused) {\n this.toggleAttribute('focused', focused);\n\n // Focus-ring is true when the element was focused from the keyboard.\n // Focus Ring [A11ycasts]: https://youtu.be/ilj2P5-5CjI\n this.toggleAttribute('focus-ring', focused && this._keyboardActive);\n }\n\n /**\n * Override to define if the field receives focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(_event) {\n return true;\n }\n\n /**\n * Override to define if the field loses focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(_event) {\n return true;\n }\n },\n);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { componentName, AvatarClass } from './AvatarClass';\nimport '@vaadin/avatar';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\n\ncustomElements.define(componentName, AvatarClass);\n\nexport { AvatarClass, componentName };\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot changes.\n */\nexport class SlotObserver {\n constructor(slot, callback) {\n /** @type HTMLSlotElement */\n this.slot = slot;\n\n /** @type Function */\n this.callback = callback;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.slot.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.slot.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this.slot.assignedNodes({ flatten: true });\n\n let addedNodes = [];\n const removedNodes = [];\n const movedNodes = [];\n\n if (currentNodes.length) {\n addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n }\n\n if (this._storedNodes.length) {\n this._storedNodes.forEach((node, index) => {\n const idx = currentNodes.indexOf(node);\n if (idx === -1) {\n removedNodes.push(node);\n } else if (idx !== index) {\n movedNodes.push(node);\n }\n });\n }\n\n if (addedNodes.length || removedNodes.length || movedNodes.length) {\n this.callback({ addedNodes, movedNodes, removedNodes });\n }\n\n this._storedNodes = currentNodes;\n }\n}\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","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that manages the slotted tooltip element.\n */\nexport class TooltipController extends SlotController {\n constructor(host) {\n // Do not provide slot factory to create tooltip lazily.\n super(host, 'tooltip');\n\n this.setTarget(host);\n }\n\n /**\n * Override to initialize the newly added custom tooltip.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n initCustomNode(tooltipNode) {\n tooltipNode.target = this.target;\n\n if (this.ariaTarget !== undefined) {\n tooltipNode.ariaTarget = this.ariaTarget;\n }\n\n if (this.context !== undefined) {\n tooltipNode.context = this.context;\n }\n\n if (this.manual !== undefined) {\n tooltipNode.manual = this.manual;\n }\n\n if (this.opened !== undefined) {\n tooltipNode.opened = this.opened;\n }\n\n if (this.position !== undefined) {\n tooltipNode._position = this.position;\n }\n\n if (this.shouldShow !== undefined) {\n tooltipNode.shouldShow = this.shouldShow;\n }\n\n this.__notifyChange();\n }\n\n /**\n * Override to notify the host when the tooltip is removed.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n teardownNode() {\n this.__notifyChange();\n }\n\n /**\n * Set an HTML element for linking with the tooltip overlay\n * via `aria-describedby` attribute used by screen readers.\n * @param {HTMLElement} ariaTarget\n */\n setAriaTarget(ariaTarget) {\n this.ariaTarget = ariaTarget;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.ariaTarget = ariaTarget;\n }\n }\n\n /**\n * Set a context object to be used by generator.\n * @param {object} context\n */\n setContext(context) {\n this.context = context;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.context = context;\n }\n }\n\n /**\n * Toggle manual state on the slotted tooltip.\n * @param {boolean} manual\n */\n setManual(manual) {\n this.manual = manual;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.manual = manual;\n }\n }\n\n /**\n * Toggle opened state on the slotted tooltip.\n * @param {boolean} opened\n */\n setOpened(opened) {\n this.opened = opened;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.opened = opened;\n }\n }\n\n /**\n * Set default position for the slotted tooltip.\n * This can be overridden by setting the position\n * using corresponding property or attribute.\n * @param {string} position\n */\n setPosition(position) {\n this.position = position;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._position = position;\n }\n }\n\n /**\n * Set function used to detect whether to show\n * the tooltip based on a condition.\n * @param {Function} shouldShow\n */\n setShouldShow(shouldShow) {\n this.shouldShow = shouldShow;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.shouldShow = shouldShow;\n }\n }\n\n /**\n * Set an HTML element to attach the tooltip to.\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.target = target;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.target = target;\n }\n }\n\n /** @private */\n __notifyChange() {\n this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node: this.node } }));\n }\n}\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n activeableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list-item');\n\nconst customMixin = (superclass) =>\n class ListItemMixinClass extends superclass {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot></slot>\n `;\n\n injectStyle(\n `\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n `,\n this\n );\n }\n };\n\nexport const ListItemClass = compose(\n createStyleMixin({\n mappings: {\n padding: {},\n backgroundColor: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n borderRadius: {},\n outline: {},\n cursor: {},\n gap: {},\n maxWidth: { selector: () => ':host' },\n alignItems: {},\n flexDirection: {},\n transition: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n customMixin,\n activeableMixin\n)(createBaseClass({ componentName, baseSelector: 'slot' }));\n"],"names":["getAncestorRootNodes","node","result","nodeType","Node","DOCUMENT_NODE","push","DOCUMENT_FRAGMENT_NODE","assignedSlot","parentNode","host","getFlattenedElements","elements","localName","assignedElements","children","forEach","elem","getClosestElement","selector","closest","getRootNode","deserializeAttributeValue","value","Set","split","serializeAttributeValue","values","join","addValueToAttribute","element","attr","getAttribute","add","setAttribute","removeValueFromAttribute","delete","size","removeAttribute","isEmptyTextNode","TEXT_NODE","textContent","trim","componentName","RawList","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","items","shadowRoot","querySelector","length","variant","item","listItem","listItemVariant","init","isReadOnly","attributeChangedCallback","name","oldValue","newValue","ListClass","mappings","hostWidth","property","maxHeight","minHeight","verticalPadding","horizontalPadding","hostDirection","fontFamily","gap","backgroundColor","borderRadius","borderColor","borderStyle","borderWidth","boxShadow","gridTemplateColumns","maxItemsWidth","minItemsWidth","itemsHorizontalAlign","emptyStateTextColor","emptyStateTextFontFamily","uniqueId","generateUniqueId","customElements","define","sizing","SlotController","EventTarget","generateId","slotName","tagName","config","initializer","multiple","observe","useUniqueId","slotInitializer","nodes","defaultId","hostConnected","initialized","initMultiple","initSingle","observeSlot","getSlotChild","initAddedNode","attachDefaultNode","initNode","getSlotChildren","defaultNode","document","createElement","Element","appendChild","Array","from","childNodes","filter","ELEMENT_NODE","slot","initCustomNode","_node","teardownNode","__slotObserver","addedNodes","removedNodes","current","newNodes","includes","remove","RawAvatar","avatarComponent","includeAttrs","mapAttrs","editableIcon","style","display","isEditable","editableBadge","avatar","AvatarClass","hostHeight","cursor","avatarTextColor","avatarBackgroundColor","editableIconColor","editableBorderColor","editableBackgroundColor","AppsListClass","itemsFontWeight","TextClass","cssVarList","fontWeight","itemsFontSize","fontSize","itemsTextAlign","textAlign","itemRenderer","icon","url","_","ref","rerenderAttrsList","superclass","slots","wrappedEleName","excludeAttrsSync","FocusMixin","_keyboardActive","ready","addEventListener","e","_shouldSetFocus","_setFocused","_shouldRemoveFocus","disconnectedCallback","hasAttribute","focused","toggleAttribute","_event","SlotObserver","callback","_storedNodes","_connected","_scheduled","_boundSchedule","_schedule","connect","disconnect","removeEventListener","queueMicrotask","flush","_processNodes","currentNodes","assignedNodes","flatten","movedNodes","index","idx","indexOf","RawText","hideWhenEmpty","hasChildren","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","TooltipController","setTarget","tooltipNode","target","undefined","ariaTarget","context","manual","opened","position","_position","shouldShow","__notifyChange","setAriaTarget","setContext","setManual","setOpened","setPosition","setShouldShow","dispatchEvent","CustomEvent","detail","ListItemClass","padding","outline","maxWidth","alignItems","flexDirection","transition"],"sourceRoot":""}
|
@@ -1,2 +1,18 @@
|
|
1
|
-
|
1
|
+
/*! For license information please see descope-avatar.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2272],{1508:(t,e,o)=>{function s(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function i(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach((t=>e.push(...i(t)))),e}function n(t,e){return e?e.closest(t)||n(t,e.getRootNode().host):null}function d(t){return t?new Set(t.split(" ")):new Set}function a(t){return t?[...t].join(" "):""}function r(t,e,o){const s=d(t.getAttribute(e));s.add(o),t.setAttribute(e,a(s))}function h(t,e,o){const s=d(t.getAttribute(e));s.delete(o),0!==s.size?t.setAttribute(e,a(s)):t.removeAttribute(e)}function l(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{Dy:()=>s,J$:()=>i,Wr:()=>h,Z4:()=>d,ZA:()=>l,el:()=>n,iA:()=>r,sz:()=>a})},11707:(t,e,o)=>{o.d(e,{I:()=>i});let s=0;function i(){return s++}},42068:(t,e,o)=>{o(88660);var s=o(87550),i=o(36411);const n=s.AH`
|
3
|
+
:host {
|
4
|
+
--lumo-size-xs: 1.625rem;
|
5
|
+
--lumo-size-s: 1.875rem;
|
6
|
+
--lumo-size-m: 2.25rem;
|
7
|
+
--lumo-size-l: 2.75rem;
|
8
|
+
--lumo-size-xl: 3.5rem;
|
9
|
+
|
10
|
+
/* Icons */
|
11
|
+
--lumo-icon-size-s: 1.25em;
|
12
|
+
--lumo-icon-size-m: 1.5em;
|
13
|
+
--lumo-icon-size-l: 2.25em;
|
14
|
+
/* For backwards compatibility */
|
15
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
16
|
+
}
|
17
|
+
`;(0,i.q)("sizing-props",n)},44099:(t,e,o)=>{o.d(e,{r:()=>d});var s=o(1508),i=o(65641),n=o(11707);class d extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.I)()}`}constructor(t,e,o,s={}){super();const{initializer:i,multiple:n,observe:d,useUniqueId:a}=s;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof d||d,this.multiple="boolean"==typeof n&&n,this.slotInitializer=i,n&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let s=this.defaultNode;return!s&&o&&(s=document.createElement(o),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,o=this.host.shadowRoot.querySelector(e);this.__slotObserver=new i.P(o,(({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],i=t.filter((t=>!(0,s.ZA)(t)&&!o.includes(t)));e.length&&(this.nodes=o.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),i&&i.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...i].filter((t=>t!==this.defaultNode)),i.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=i[0],this.initAddedNode(this.node)))}))}}},44666:(t,e,o)=>{o.d(e,{E:()=>u,T:()=>a});var s=o(88961),i=o(72270),n=o(63200),d=o(25964);const a=(0,d.xE)("avatar");class r extends((0,i.qu)({componentName:a,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <vaadin-avatar></vaadin-avatar>\n <div class="editableBadge">\n <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n </div>\n </div>\n\t\t',(0,d.fz)("\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n ",this),this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,d.EA)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,d.mx)(this,(()=>{t.style.display=this.isEditable?"":"none"}),{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:h,editableBadge:l,avatar:c}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},u=(0,n.Zz)((0,s.RF)({mappings:{hostWidth:[{...h,property:"width"},{...h,property:"min-width"}],hostHeight:{...h,property:"height"},cursor:[c,h],hostDirection:{...h,property:"direction"},avatarTextColor:{...c,property:"color"},avatarBackgroundColor:{...c,property:"background-color"},editableIconColor:{...l,property:"color"},editableBorderColor:{...l,property:"border-color"},editableBackgroundColor:{...l,property:"background-color"}}}),s.VO,s.tQ)(r)},53149:(t,e,o)=>{o.d(e,{y:()=>n});var s=o(98741),i=o(30025);const n=(0,s.y)((t=>class extends t{get _keyboardActive(){return(0,i.aJ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},64309:(t,e,o)=>{o.r(e),o.d(e,{AvatarClass:()=>s.E,componentName:()=>s.T});var s=o(44666);o(4408),o(95260),o(37182),customElements.define(s.T,s.E)},65641:(t,e,o)=>{o.d(e,{P:()=>s});class s{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const o=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,i)=>{const n=t.indexOf(e);-1===n?o.push(e):n!==i&&s.push(e)})),(e.length||o.length||s.length)&&this.callback({addedNodes:e,movedNodes:s,removedNodes:o}),this._storedNodes=t}}},81488:(t,e,o)=>{o.d(e,{I:()=>i});var s=o(44099);class i extends s.r{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}}}]);
|
2
18
|
//# sourceMappingURL=descope-avatar.js.map
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @license
|
9
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
10
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
11
|
+
*/
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @license
|
15
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
16
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
17
|
+
*/
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @license
|
21
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
22
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
23
|
+
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-avatar.js","mappings":"+OAcO,MAAMA,GAAgB,QAAiB,UAC9C,MAAMC,WAAkB,QAAgB,CACtCD,gBACAE,aAAc,sBAEd,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,+MAShD,QAAY,m0BAsCTH,MAEHA,KAAKI,gBAAkBJ,KAAKK,WAAWC,cAAc,kBAErD,QAAaN,KAAMA,KAAKI,gBAAiB,CACvCG,aAAc,CAAC,eAAgB,MAAO,QACtCC,SAAU,CAAE,eAAgB,UAG9B,MAAMC,EAAeT,KAAKK,WAAWC,cAAc,mBAEnD,QACEN,MACA,KACES,EAAaC,MAAMC,QAAUX,KAAKY,WAAa,GAAK,MAAM,GAE5D,CAAEL,aAAc,CAAC,aAErB,CAEA,cAAIK,GACF,MAAyC,SAAlCZ,KAAKa,aAAa,WAC3B,EAGF,MAAM,KAAEC,EAAI,cAAEC,EAAa,OAAEC,GAAW,CACtCF,KAAM,CAAEG,SAAU,IAAM,SACxBF,cAAe,CAAEE,SAAU,oBAC3BD,OAAQ,CAAEC,SAAU,kBAGTC,GAAc,SACzB,QAAiB,CACfC,SAAU,CACRC,UAAW,CACT,IAAKN,EAAMO,SAAU,SACrB,IAAKP,EAAMO,SAAU,cAEvBC,WAAY,IAAKR,EAAMO,SAAU,UACjCE,OAAQ,CAACP,EAAQF,GACjBU,cAAe,IAAKV,EAAMO,SAAU,aACpCI,gBAAiB,IAAKT,EAAQK,SAAU,SACxCK,sBAAuB,IAAKV,EAAQK,SAAU,oBAC9CM,kBAAmB,IAAKZ,EAAeM,SAAU,SACjDO,oBAAqB,IAAKb,EAAeM,SAAU,gBACnDQ,wBAAyB,IACpBd,EACHM,SAAU,uBAIhB,KACA,KArByB,CAsBzBzB,G,0BCrHFkC,eAAeC,OAAOpC,EAAeuB,E","sources":["webpack://@descope/web-components-ui/../components/descope-avatar/src/component/AvatarClass.js","webpack://@descope/web-components-ui/../components/descope-avatar/src/component/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('avatar');\nclass RawAvatar extends createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <vaadin-avatar></vaadin-avatar>\n <div class=\"editableBadge\">\n <vaadin-icon icon=\"vaadin:pencil\"></vaadin-icon>\n </div>\n </div>\n\t\t`;\n\n injectStyle(`\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n `, this);\n\n this.avatarComponent = this.shadowRoot.querySelector('vaadin-avatar');\n\n forwardAttrs(this, this.avatarComponent, {\n includeAttrs: ['display-name', 'img', 'abbr'],\n mapAttrs: { 'display-name': 'name' },\n });\n\n const editableIcon = this.shadowRoot.querySelector('.editableBadge');\n\n observeAttributes(\n this,\n () => {\n editableIcon.style.display = this.isEditable ? '' : 'none';\n },\n { includeAttrs: ['editable'] },\n );\n }\n\n get isEditable() {\n return this.getAttribute('editable') === 'true';\n }\n}\n\nconst { host, editableBadge, avatar } = {\n host: { selector: () => ':host' },\n editableBadge: { selector: '> .editableBadge' },\n avatar: { selector: 'vaadin-avatar' },\n};\n\nexport const AvatarClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [\n { ...host, property: 'width' },\n { ...host, property: 'min-width' },\n ],\n hostHeight: { ...host, property: 'height' },\n cursor: [avatar, host],\n hostDirection: { ...host, property: 'direction' },\n avatarTextColor: { ...avatar, property: 'color' },\n avatarBackgroundColor: { ...avatar, property: 'background-color' },\n editableIconColor: { ...editableBadge, property: 'color' },\n editableBorderColor: { ...editableBadge, property: 'border-color' },\n editableBackgroundColor: {\n ...editableBadge,\n property: 'background-color',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawAvatar);\n","import { componentName, AvatarClass } from './AvatarClass';\nimport '@vaadin/avatar';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\n\ncustomElements.define(componentName, AvatarClass);\n\nexport { AvatarClass, componentName };\n"],"names":["componentName","RawAvatar","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","avatarComponent","shadowRoot","querySelector","includeAttrs","mapAttrs","editableIcon","style","display","isEditable","getAttribute","host","editableBadge","avatar","selector","AvatarClass","mappings","hostWidth","property","hostHeight","cursor","hostDirection","avatarTextColor","avatarBackgroundColor","editableIconColor","editableBorderColor","editableBackgroundColor","customElements","define"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"descope-avatar.js","mappings":";wIAgBO,SAASA,EAAqBC,GACnC,MAAMC,EAAS,GAEf,KAAOD,GAAM,CACX,GAAIA,EAAKE,WAAaC,KAAKC,cAAe,CACxCH,EAAOI,KAAKL,GACZ,KACF,CAEIA,EAAKE,WAAaC,KAAKG,uBAOzBN,EADEA,EAAKO,aACAP,EAAKO,aAIPP,EAAKQ,YAVVP,EAAOI,KAAKL,GACZA,EAAOA,EAAKS,KAUhB,CAEA,OAAOR,CACT,CAUO,SAASS,EAAqBV,GACnC,MAAMC,EAAS,GACf,IAAIU,EAQJ,MAPuB,SAAnBX,EAAKY,UACPD,EAAWX,EAAKa,oBAEhBZ,EAAOI,KAAKL,GACZW,EAAW,IAAIX,EAAKc,WAEtBH,EAASI,SAASC,GAASf,EAAOI,QAAQK,EAAqBM,MACxDf,CACT,CAUO,SAASgB,EAAkBC,EAAUlB,GAC1C,OAAKA,EAIEA,EAAKmB,QAAQD,IAAaD,EAAkBC,EAAUlB,EAAKoB,cAAcX,MAHvE,IAIX,CAQO,SAASY,EAA0BC,GACxC,OAAKA,EAIE,IAAIC,IAAID,EAAME,MAAM,MAHlB,IAAID,GAIf,CAQO,SAASE,EAAwBC,GACtC,OAAOA,EAAS,IAAIA,GAAQC,KAAK,KAAO,EAC1C,CASO,SAASC,EAAoBC,EAASC,EAAMR,GACjD,MAAMI,EAASL,EAA0BQ,EAAQE,aAAaD,IAC9DJ,EAAOM,IAAIV,GACXO,EAAQI,aAAaH,EAAML,EAAwBC,GACrD,CAUO,SAASQ,EAAyBL,EAASC,EAAMR,GACtD,MAAMI,EAASL,EAA0BQ,EA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,SACPN,EAAYM,OAAS7G,KAAK6G,aAGNJ,IAAlBzG,KAAK8G,WACPP,EAAYQ,UAAY/G,KAAK8G,eAGPL,IAApBzG,KAAKgH,aACPT,EAAYS,WAAahH,KAAKgH,YAGhChH,KAAKiH,gBACP,CASA,YAAArF,GACE5B,KAAKiH,gBACP,CAOA,aAAAC,CAAcR,GACZ1G,KAAK0G,WAAaA,EAElB,MAAMH,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYG,WAAaA,EAE7B,CAMA,UAAAS,CAAWR,GACT3G,KAAK2G,QAAUA,EAEf,MAAMJ,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYI,QAAUA,EAE1B,CAMA,SAAAS,CAAUR,GACR5G,KAAK4G,OAASA,EAEd,MAAML,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYK,OAASA,EAEzB,CAMA,SAAAS,CAAUR,GACR7G,KAAK6G,OAASA,EAEd,MAAMN,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYM,OAASA,EAEzB,CAQA,WAAAS,CAAYR,GACV9G,KAAK8G,SAAWA,EAEhB,MAAMP,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYQ,UAAYD,EAE5B,CAOA,aAAAS,CAAcP,GACZhH,KAAKgH,WAAaA,EAElB,MAAMT,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYS,WAAaA,EAE7B,CAMA,SAAAV,CAAUE,GACRxG,KAAKwG,OAASA,EAEd,MAAMD,EAAcvG,KAAKzD,KACrBgK,IACFA,EAAYC,OAASA,EAEzB,CAGA,cAAAS,GACEjH,KAAKwH,cAAc,IAAIC,YAAY,kBAAmB,CAAEC,OAAQ,CAAEnL,KAAMyD,KAAKzD,QAC/E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/dom-utils.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/sizing.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-controller.js","webpack://@descope/web-components-ui/../components/descope-avatar/src/component/AvatarClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/a11y-base/src/focus-mixin.js","webpack://@descope/web-components-ui/../components/descope-avatar/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-observer.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/tooltip-controller.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst sizing = css`\n :host {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n`;\n\naddLumoGlobalStyles('sizing-props', sizing);\n\nexport { sizing };\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 { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} slotName\n * @return {string}\n * @protected\n */\n static generateId(host, slotName) {\n const prefix = slotName || 'default';\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.defaultNode = node;\n }\n }\n\n if (node) {\n this.node = node;\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n const newNodes = addedNodes.filter((node) => !isEmptyTextNode(node) && !current.includes(node));\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes && newNodes.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('avatar');\nclass RawAvatar extends createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <vaadin-avatar></vaadin-avatar>\n <div class=\"editableBadge\">\n <vaadin-icon icon=\"vaadin:pencil\"></vaadin-icon>\n </div>\n </div>\n\t\t`;\n\n injectStyle(`\n :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n .editableBadge {\n border: 1px solid;\n border-radius: 100%;\n height: fit-content;\n width: 25%;\n height: 25%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 5%;\n box-sizing: border-box;\n position: absolute;\n bottom: 0;\n inset-inline-end: 0;\n }\n\n vaadin-icon {\n color: currentcolor;\n }\n\n vaadin-avatar {\n width: 100%;\n height: 100%;\n margin: 0;\n border: none\n }\n\n .wrapper {\n display: inline-flex;\n position: relative;\n width: 100%;\n height: 100%;\n }\n `, this);\n\n this.avatarComponent = this.shadowRoot.querySelector('vaadin-avatar');\n\n forwardAttrs(this, this.avatarComponent, {\n includeAttrs: ['display-name', 'img', 'abbr'],\n mapAttrs: { 'display-name': 'name' },\n });\n\n const editableIcon = this.shadowRoot.querySelector('.editableBadge');\n\n observeAttributes(\n this,\n () => {\n editableIcon.style.display = this.isEditable ? '' : 'none';\n },\n { includeAttrs: ['editable'] },\n );\n }\n\n get isEditable() {\n return this.getAttribute('editable') === 'true';\n }\n}\n\nconst { host, editableBadge, avatar } = {\n host: { selector: () => ':host' },\n editableBadge: { selector: '> .editableBadge' },\n avatar: { selector: 'vaadin-avatar' },\n};\n\nexport const AvatarClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [\n { ...host, property: 'width' },\n { ...host, property: 'min-width' },\n ],\n hostHeight: { ...host, property: 'height' },\n cursor: [avatar, host],\n hostDirection: { ...host, property: 'direction' },\n avatarTextColor: { ...avatar, property: 'color' },\n avatarBackgroundColor: { ...avatar, property: 'background-color' },\n editableIconColor: { ...editableBadge, property: 'color' },\n editableBorderColor: { ...editableBadge, property: 'border-color' },\n editableBackgroundColor: {\n ...editableBadge,\n property: 'background-color',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawAvatar);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { isKeyboardActive } from './focus-utils.js';\n\n/**\n * A mixin to handle `focused` and `focus-ring` attributes based on focus.\n *\n * @polymerMixin\n */\nexport const FocusMixin = dedupingMixin(\n (superclass) =>\n class FocusMixinClass extends superclass {\n /**\n * @protected\n * @return {boolean}\n */\n get _keyboardActive() {\n return isKeyboardActive();\n }\n\n /** @protected */\n ready() {\n this.addEventListener('focusin', (e) => {\n if (this._shouldSetFocus(e)) {\n this._setFocused(true);\n }\n });\n\n this.addEventListener('focusout', (e) => {\n if (this._shouldRemoveFocus(e)) {\n this._setFocused(false);\n }\n });\n\n // In super.ready() other 'focusin' and 'focusout' listeners might be\n // added, so we call it after our own ones to ensure they execute first.\n // Issue to watch out: when incorrect, <vaadin-combo-box> refocuses the\n // input field on iOS after \"Done\" is pressed.\n super.ready();\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // In non-Chrome browsers, blur does not fire on the element when it is disconnected.\n // reproducible in `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n if (this.hasAttribute('focused')) {\n this._setFocused(false);\n }\n }\n\n /**\n * Override to change how focused and focus-ring attributes are set.\n *\n * @param {boolean} focused\n * @protected\n */\n _setFocused(focused) {\n this.toggleAttribute('focused', focused);\n\n // Focus-ring is true when the element was focused from the keyboard.\n // Focus Ring [A11ycasts]: https://youtu.be/ilj2P5-5CjI\n this.toggleAttribute('focus-ring', focused && this._keyboardActive);\n }\n\n /**\n * Override to define if the field receives focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(_event) {\n return true;\n }\n\n /**\n * Override to define if the field loses focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(_event) {\n return true;\n }\n },\n);\n","import { componentName, AvatarClass } from './AvatarClass';\nimport '@vaadin/avatar';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\n\ncustomElements.define(componentName, AvatarClass);\n\nexport { AvatarClass, componentName };\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot changes.\n */\nexport class SlotObserver {\n constructor(slot, callback) {\n /** @type HTMLSlotElement */\n this.slot = slot;\n\n /** @type Function */\n this.callback = callback;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.slot.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.slot.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this.slot.assignedNodes({ flatten: true });\n\n let addedNodes = [];\n const removedNodes = [];\n const movedNodes = [];\n\n if (currentNodes.length) {\n addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n }\n\n if (this._storedNodes.length) {\n this._storedNodes.forEach((node, index) => {\n const idx = currentNodes.indexOf(node);\n if (idx === -1) {\n removedNodes.push(node);\n } else if (idx !== index) {\n movedNodes.push(node);\n }\n });\n }\n\n if (addedNodes.length || removedNodes.length || movedNodes.length) {\n this.callback({ addedNodes, movedNodes, removedNodes });\n }\n\n this._storedNodes = currentNodes;\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that manages the slotted tooltip element.\n */\nexport class TooltipController extends SlotController {\n constructor(host) {\n // Do not provide slot factory to create tooltip lazily.\n super(host, 'tooltip');\n\n this.setTarget(host);\n }\n\n /**\n * Override to initialize the newly added custom tooltip.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n initCustomNode(tooltipNode) {\n tooltipNode.target = this.target;\n\n if (this.ariaTarget !== undefined) {\n tooltipNode.ariaTarget = this.ariaTarget;\n }\n\n if (this.context !== undefined) {\n tooltipNode.context = this.context;\n }\n\n if (this.manual !== undefined) {\n tooltipNode.manual = this.manual;\n }\n\n if (this.opened !== undefined) {\n tooltipNode.opened = this.opened;\n }\n\n if (this.position !== undefined) {\n tooltipNode._position = this.position;\n }\n\n if (this.shouldShow !== undefined) {\n tooltipNode.shouldShow = this.shouldShow;\n }\n\n this.__notifyChange();\n }\n\n /**\n * Override to notify the host when the tooltip is removed.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n teardownNode() {\n this.__notifyChange();\n }\n\n /**\n * Set an HTML element for linking with the tooltip overlay\n * via `aria-describedby` attribute used by screen readers.\n * @param {HTMLElement} ariaTarget\n */\n setAriaTarget(ariaTarget) {\n this.ariaTarget = ariaTarget;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.ariaTarget = ariaTarget;\n }\n }\n\n /**\n * Set a context object to be used by generator.\n * @param {object} context\n */\n setContext(context) {\n this.context = context;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.context = context;\n }\n }\n\n /**\n * Toggle manual state on the slotted tooltip.\n * @param {boolean} manual\n */\n setManual(manual) {\n this.manual = manual;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.manual = manual;\n }\n }\n\n /**\n * Toggle opened state on the slotted tooltip.\n * @param {boolean} opened\n */\n setOpened(opened) {\n this.opened = opened;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.opened = opened;\n }\n }\n\n /**\n * Set default position for the slotted tooltip.\n * This can be overridden by setting the position\n * using corresponding property or attribute.\n * @param {string} position\n */\n setPosition(position) {\n this.position = position;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._position = position;\n }\n }\n\n /**\n * Set function used to detect whether to show\n * the tooltip based on a condition.\n * @param {Function} shouldShow\n */\n setShouldShow(shouldShow) {\n this.shouldShow = shouldShow;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.shouldShow = shouldShow;\n }\n }\n\n /**\n * Set an HTML element to attach the tooltip to.\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.target = target;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.target = target;\n }\n }\n\n /** @private */\n __notifyChange() {\n this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node: this.node } }));\n }\n}\n"],"names":["getAncestorRootNodes","node","result","nodeType","Node","DOCUMENT_NODE","push","DOCUMENT_FRAGMENT_NODE","assignedSlot","parentNode","host","getFlattenedElements","elements","localName","assignedElements","children","forEach","elem","getClosestElement","selector","closest","getRootNode","deserializeAttributeValue","value","Set","split","serializeAttributeValue","values","join","addValueToAttribute","element","attr","getAttribute","add","setAttribute","removeValueFromAttribute","delete","size","removeAttribute","isEmptyTextNode","TEXT_NODE","textContent","trim","uniqueId","generateUniqueId","sizing","SlotController","EventTarget","generateId","slotName","constructor","tagName","config","super","initializer","multiple","observe","useUniqueId","this","slotInitializer","nodes","defaultId","hostConnected","initialized","initMultiple","initSingle","observeSlot","getSlotChild","initAddedNode","attachDefaultNode","initNode","getSlotChildren","length","defaultNode","document","createElement","Element","appendChild","Array","from","childNodes","filter","ELEMENT_NODE","slot","initCustomNode","_node","teardownNode","shadowRoot","querySelector","__slotObserver","addedNodes","removedNodes","current","newNodes","includes","remove","componentName","RawAvatar","baseSelector","attachShadow","mode","innerHTML","avatarComponent","includeAttrs","mapAttrs","editableIcon","style","display","isEditable","editableBadge","avatar","AvatarClass","mappings","hostWidth","property","hostHeight","cursor","hostDirection","avatarTextColor","avatarBackgroundColor","editableIconColor","editableBorderColor","editableBackgroundColor","FocusMixin","superclass","_keyboardActive","ready","addEventListener","e","_shouldSetFocus","_setFocused","_shouldRemoveFocus","disconnectedCallback","hasAttribute","focused","toggleAttribute","_event","customElements","define","SlotObserver","callback","_storedNodes","_connected","_scheduled","_boundSchedule","_schedule","connect","disconnect","removeEventListener","queueMicrotask","flush","_processNodes","currentNodes","assignedNodes","flatten","movedNodes","index","idx","indexOf","TooltipController","setTarget","tooltipNode","target","undefined","ariaTarget","context","manual","opened","position","_position","shouldShow","__notifyChange","setAriaTarget","setContext","setManual","setOpened","setPosition","setShouldShow","dispatchEvent","CustomEvent","detail"],"sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-button.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5087],{
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5087],{8512:(t,e,r)=>{r.d(e,{T:()=>l,q:()=>h});var o=r(88961),i=r(72270),n=r(63200),a=r(25964),s=r(18782);const l=(0,a.xE)("image"),c=["src","src-dark"];class d extends((0,i.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,a.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get src(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}renderImage(){this.toggleVisibility(this.src),(0,s.m)(this.src,this.altText).then((t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))}))}shouldRender(t){const e=this.getAttribute(t);return this.src===e}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&this.shouldRender(t)&&this.renderImage()}}const h=(0,n.Zz)((0,o.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),o.VO,o.tQ)(d)},10767:(t,e,r)=>{r.d(e,{G:()=>o});const o=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},18782:(t,e,r)=>{r.d(e,{m:()=>n});var o=r(25414);const i=t=>{const e=o.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},n=async(t,e)=>{try{let r;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));r=i(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),o=await e.text();r=i(o)}else r=((t,e)=>{const r=document.createElement("img");return r.setAttribute("src",t),r.setAttribute("alt",e),r})(t,e);return r.style.setProperty("max-width","100%"),r.style.setProperty("max-height","100%"),r}catch{return null}}},19624:(t,e,r)=>{r.d(e,{J:()=>m,T:()=>l});var o=r(63200),i=r(25964),n=r(88961),a=r(98538),s=r(10767);const l=(0,i.xE)("button"),{host:c,label:d,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const m=(0,o.Zz)((0,n.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...c,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:a.S.cssVarList.fill},labelTextDecoration:{...d,property:"text-decoration"},labelSpacing:{...d,property:"gap"},textAlign:{...d,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),s.G,n.VO,n.tQ)((0,n.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${m.cssVarList.outlineWidth}) + var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${m.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${m.cssVarList.hostHeight}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${m.cssVarList.hostWidth}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:p,fontSize:b}=m.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${p});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},30576:(t,e,r)=>{r.r(e),r.d(e,{ButtonClass:()=>o.J,componentName:()=>o.T});var o=r(19624);r(83799),customElements.define(o.T,o.J)},83799:(t,e,r)=>{r(93555),r(89389)},89389:(t,e,r)=>{r.d(e,{$:()=>p});var o=r(13256),i=r(55774),n=r(82901),a=r(90676),s=r(81488),l=r(87550);const c=r(51450).AH`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|
@@ -59,7 +59,7 @@
|
|
59
59
|
outline-color: GrayText;
|
60
60
|
}
|
61
61
|
}
|
62
|
-
`;var d=
|
62
|
+
`;var d=r(84467),h=r(53149),u=r(36176);const m=t=>class extends((0,d.e)((0,u.l)((0,h.y)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.SF)("vaadin-button",c,{moduleId:"vaadin-button-styles"});class p extends(m((0,a.q)((0,l.cp)((0,i.w)(o.Pu))))){static get is(){return"vaadin-button"}static get template(){return o.qy`
|
63
63
|
<div class="vaadin-button-container">
|
64
64
|
<span part="prefix" aria-hidden="true">
|
65
65
|
<slot name="prefix"></slot>
|
@@ -72,7 +72,7 @@
|
|
72
72
|
</span>
|
73
73
|
</div>
|
74
74
|
<slot name="tooltip"></slot>
|
75
|
-
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,
|
75
|
+
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,n.X)(p)},93555:(t,e,r)=>{r.d(e,{x:()=>i}),r(64511),r(42068),r(9433),r(3241),r(83315);var o=r(87550);const i=o.AH`
|
76
76
|
:host {
|
77
77
|
/* Sizing */
|
78
78
|
--lumo-button-size: var(--lumo-size-m);
|
@@ -335,5 +335,5 @@
|
|
335
335
|
margin-left: 0;
|
336
336
|
margin-right: 0;
|
337
337
|
}
|
338
|
-
`;(0,
|
338
|
+
`;(0,o.SF)("vaadin-button",i,{moduleId:"lumo-button"})},98538:(t,e,r)=>{r.d(e,{S:()=>l,T:()=>s});var o=r(88961),i=r(25964),n=r(8512),a=r(63200);const s=(0,i.xE)("icon"),l=(0,a.Zz)((0,o.RF)({mappings:{fill:[{},{property:n.q.cssVarList.fill}]}}),o.VO,o.tQ)((0,o.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n }\n ",excludeAttrsSync:["tabindex","class"],componentName:s}))}}]);
|
339
339
|
//# sourceMappingURL=descope-button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-button.js","mappings":";0JAAO,MAAMA,EAAkBC,GAC7B,cAAkCA,EAChC,aAAIC,GACF,MAAwC,SAAjCC,KAAKC,aAAa,UAC3B,CAEA,KAAAC,GACEF,KAAKD,WAAaI,MAAMD,OAC1B,wGCGG,MAAME,GAAgB,QAAiB,WAsCxC,KAAEC,EAAI,MAAEC,EAAK,YAAEC,GAAgB,CACnCF,KAAM,CAAEG,SAAU,IAAM,SACxBF,MAAO,CAAEE,SAAU,iBACnBD,YAAa,CAAEC,SAAU,IAAM,4BAGjC,IAAIC,EAEG,MAAMC,GAAc,SACzB,QAAiB,CACfC,SAAU,CACRC,UAAW,CAAEC,SAAU,SACvBC,WAAY,CAAED,SAAU,UACxBE,cAAe,IAAKV,EAAMQ,SAAU,aACpCG,SAAU,CAAC,EACXC,WAAY,CAAC,EAEbC,OAAQ,CAAC,EACTC,gBAAiB,CAAC,EAElBC,cAAe,CAAC,EAChBC,aAAc,CAAC,EACfC,aAAc,CAAC,EACfC,aAAc,CAAC,EAEfC,aAAc,CAAC,EACfC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,EAEdC,gBAAiB,CAAC,CAAEf,SAAU,eAAiB,CAAEA,SAAU,mBAC3DgB,kBAAmB,CACjB,CAAEhB,SAAU,gBAAiBiB,SAAU,WACvC,CAAEjB,SAAU,eAAgBiB,SAAU,YAGxCC,eAAgB,CAAElB,SAAU,SAC5BmB,UAAW,CACTxB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WH,EAAMI,SAIzDhE,KAAKuD,YAAYU,SAASL,EAAMM,OAClCN,EAAMO,iBAINnE,KAAKE,QAET,ICzEJ,QAAe,gBAAiB4C,EAAc,CAAEsB,SAAU,yBAqC1D,MAAMC,UAAetB,GAAY,QAAa,SAAc,OAAgB,UAC1E,aAAWuB,GACT,MAAO,eACT,CAEA,mBAAWC,GACT,OAAsB,IFYkB;;;;;;;;;;;;;CEX1C,CAGA,KAAAf,GACErD,MAAMqD,QAENxD,KAAKwE,mBAAqB,IAAI,IAAkBxE,MAChDA,KAAKyE,cAAczE,KAAKwE,mBAC1B,GAGF,OAAoBH,+FC9DpB,MAAMK,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAEN,SAAU,+FCvQ7C,MAAMhE,GAAgB,QAAiB,QAEjCuE,GAAY,SACvB,QAAiB,CACfhE,SAAU,CACRuB,KAAM,CAAC,KAGX,KACA,KAPuB,EASvB,QAAY,CACVK,MAAO,GACPC,eAAgB,gBAChBC,MAAO,IAAM,kEAKbC,iBAAkB,CAAC,WAAY,SAC/BtC","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n }),\n);\n"],"names":["clickableMixin","superclass","isLoading","this","getAttribute","click","super","componentName","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","mappings","hostWidth","property","hostHeight","hostDirection","fontSize","fontFamily","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","style","excludeAttrsSync","color","customElements","define","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","value","reflectToAttribute","_activeKeys","ready","hasAttribute","setAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController","button","IconClass"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"descope-button.js","mappings":";4NAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB,QAAgB,CACrCF,gBACAG,aAAc,UAEd,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE,6UAoBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SACNJ,KAAKK,iBAAiBL,KAAKM,IAC7B,CAEA,aAAAC,GACEP,KAAKQ,aACP,CAEA,gBAAAH,CAAiBI,GACXA,EACFT,KAAKU,UAAUC,OAAO,UAEtBX,KAAKU,UAAUE,IAAI,SAEvB,CAEA,WAAIC,GACF,OAAOb,KAAKc,aAAa,QAAU,EACrC,CAEA,aAAIC,GACF,OAAOf,KA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SAC/BjH","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get src() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n // eslint-disable-next-line class-methods-use-this\n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.src);\n\n createImage(this.src, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.src === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","clickableMixin","superclass","isLoading","click","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","hostWidth","property","hostHeight","hostDirection","fontSize","fontFamily","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","excludeAttrsSync","color","customElements","define","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","value","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController","button","IconClass"],"sourceRoot":""}
|