@limetech/lime-elements 38.44.1 → 38.46.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/CHANGELOG.md +14 -0
- package/dist/cjs/dispatch-resize-event-56be38b4.js +54 -0
- package/dist/cjs/dispatch-resize-event-56be38b4.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js +1 -3
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +2 -8
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-callout.cjs.entry.js +1 -4
- package/dist/cjs/limel-callout.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-card.cjs.entry.js +54 -2
- package/dist/cjs/limel-card.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -4
- package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +1 -1
- package/dist/cjs/limel-file.cjs.entry.js +1 -4
- package/dist/cjs/limel-file.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -4
- package/dist/cjs/limel-header.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-help-content.cjs.entry.js +1 -4
- package/dist/cjs/limel-help-content.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-help.cjs.entry.js +3 -5
- package/dist/cjs/limel-help.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -3
- package/dist/cjs/limel-markdown.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +2 -4
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js.map +1 -1
- package/dist/collection/components/callout/callout.js +2 -5
- package/dist/collection/components/callout/callout.js.map +1 -1
- package/dist/collection/components/card/card.css +30 -1
- package/dist/collection/components/card/card.js +60 -1
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/chip-set/chip-set.js +2 -5
- package/dist/collection/components/chip-set/chip-set.js.map +1 -1
- package/dist/collection/components/file/file.js +2 -5
- package/dist/collection/components/file/file.js.map +1 -1
- package/dist/collection/components/header/header.js +2 -5
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/help/help-content.js +2 -5
- package/dist/collection/components/help/help-content.js.map +1 -1
- package/dist/collection/components/help/help.js +4 -6
- package/dist/collection/components/help/help.js.map +1 -1
- package/dist/collection/components/input-field/input-field.js +2 -6
- package/dist/collection/components/input-field/input-field.js.map +1 -1
- package/dist/collection/components/markdown/markdown.js +2 -4
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/components/spinner/spinner.js +2 -4
- package/dist/collection/components/spinner/spinner.js.map +1 -1
- package/dist/collection/interface.js +1 -0
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/util/dispatch-resize-event.js +43 -0
- package/dist/collection/util/dispatch-resize-event.js.map +1 -1
- package/dist/esm/dispatch-resize-event-abb5edbb.js +51 -0
- package/dist/esm/dispatch-resize-event-abb5edbb.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar-item_2.entry.js +2 -4
- package/dist/esm/limel-action-bar-item_2.entry.js.map +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +2 -8
- package/dist/esm/limel-breadcrumbs_7.entry.js.map +1 -1
- package/dist/esm/limel-callout.entry.js +2 -5
- package/dist/esm/limel-callout.entry.js.map +1 -1
- package/dist/esm/limel-card.entry.js +54 -2
- package/dist/esm/limel-card.entry.js.map +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -4
- package/dist/esm/limel-chip_2.entry.js.map +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +1 -1
- package/dist/esm/limel-file.entry.js +2 -5
- package/dist/esm/limel-file.entry.js.map +1 -1
- package/dist/esm/limel-header.entry.js +2 -5
- package/dist/esm/limel-header.entry.js.map +1 -1
- package/dist/esm/limel-help-content.entry.js +2 -5
- package/dist/esm/limel-help-content.entry.js.map +1 -1
- package/dist/esm/limel-help.entry.js +4 -6
- package/dist/esm/limel-help.entry.js.map +1 -1
- package/dist/esm/limel-markdown.entry.js +2 -4
- package/dist/esm/limel-markdown.entry.js.map +1 -1
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/index.esm.js +1 -1
- package/dist/lime-elements/index.esm.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-0c203c29.entry.js +2 -0
- package/dist/lime-elements/p-0c203c29.entry.js.map +1 -0
- package/dist/lime-elements/p-404af152.entry.js +2 -0
- package/dist/lime-elements/p-404af152.entry.js.map +1 -0
- package/dist/lime-elements/p-4709aaa8.entry.js +2 -0
- package/dist/lime-elements/p-4709aaa8.entry.js.map +1 -0
- package/dist/lime-elements/{p-333ba7ca.entry.js → p-4f2b9345.entry.js} +2 -2
- package/dist/lime-elements/p-666aeb03.entry.js +2 -0
- package/dist/lime-elements/p-666aeb03.entry.js.map +1 -0
- package/dist/lime-elements/{p-dd0f3190.entry.js → p-8a7b61e7.entry.js} +2 -2
- package/dist/lime-elements/{p-26c56b38.entry.js → p-8f8e81a9.entry.js} +2 -2
- package/dist/lime-elements/p-8f8e81a9.entry.js.map +1 -0
- package/dist/lime-elements/{p-61270ddc.entry.js → p-b5e8a4af.entry.js} +3 -3
- package/dist/lime-elements/p-b5e8a4af.entry.js.map +1 -0
- package/dist/lime-elements/p-c3f85d29.entry.js +2 -0
- package/dist/lime-elements/p-c3f85d29.entry.js.map +1 -0
- package/dist/lime-elements/p-cb892352.js +2 -0
- package/dist/lime-elements/p-cb892352.js.map +1 -0
- package/dist/lime-elements/p-d3d4fe88.entry.js +2 -0
- package/dist/lime-elements/p-d3d4fe88.entry.js.map +1 -0
- package/dist/lime-elements/p-d759e826.entry.js +2 -0
- package/dist/lime-elements/p-d759e826.entry.js.map +1 -0
- package/dist/lime-elements/{p-ead08551.entry.js → p-f202ffb4.entry.js} +5 -5
- package/dist/lime-elements/p-f3180d48.entry.js +2 -0
- package/dist/lime-elements/p-f3180d48.entry.js.map +1 -0
- package/dist/types/components/action-bar/action-bar-item/action-bar-overflow-menu.d.ts +1 -1
- package/dist/types/components/callout/callout.d.ts +1 -1
- package/dist/types/components/card/card.d.ts +9 -0
- package/dist/types/components/chip-set/chip-set.d.ts +1 -1
- package/dist/types/components/file/file.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +1 -1
- package/dist/types/components/help/help-content.d.ts +1 -1
- package/dist/types/components/help/help.d.ts +1 -1
- package/dist/types/components/input-field/input-field.d.ts +1 -1
- package/dist/types/components/markdown/markdown.d.ts +1 -1
- package/dist/types/components/spinner/spinner.d.ts +1 -1
- package/dist/types/components.d.ts +4 -0
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/util/dispatch-resize-event.d.ts +38 -0
- package/package.json +1 -1
- package/dist/cjs/dispatch-resize-event-4462d78f.js +0 -10
- package/dist/cjs/dispatch-resize-event-4462d78f.js.map +0 -1
- package/dist/esm/dispatch-resize-event-cd1d230c.js +0 -8
- package/dist/esm/dispatch-resize-event-cd1d230c.js.map +0 -1
- package/dist/lime-elements/p-26c56b38.entry.js.map +0 -1
- package/dist/lime-elements/p-2a616374.entry.js +0 -2
- package/dist/lime-elements/p-2a616374.entry.js.map +0 -1
- package/dist/lime-elements/p-32611964.entry.js +0 -2
- package/dist/lime-elements/p-32611964.entry.js.map +0 -1
- package/dist/lime-elements/p-4d225689.entry.js +0 -2
- package/dist/lime-elements/p-4d225689.entry.js.map +0 -1
- package/dist/lime-elements/p-61270ddc.entry.js.map +0 -1
- package/dist/lime-elements/p-67b697b4.entry.js +0 -2
- package/dist/lime-elements/p-67b697b4.entry.js.map +0 -1
- package/dist/lime-elements/p-8535dc16.entry.js +0 -2
- package/dist/lime-elements/p-8535dc16.entry.js.map +0 -1
- package/dist/lime-elements/p-b076958e.entry.js +0 -2
- package/dist/lime-elements/p-b076958e.entry.js.map +0 -1
- package/dist/lime-elements/p-c70b1ea3.js +0 -2
- package/dist/lime-elements/p-c70b1ea3.js.map +0 -1
- package/dist/lime-elements/p-e22edc40.entry.js +0 -2
- package/dist/lime-elements/p-e22edc40.entry.js.map +0 -1
- package/dist/lime-elements/p-f8cbb607.entry.js +0 -2
- package/dist/lime-elements/p-f8cbb607.entry.js.map +0 -1
- /package/dist/lime-elements/{p-333ba7ca.entry.js.map → p-4f2b9345.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-dd0f3190.entry.js.map → p-8a7b61e7.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-ead08551.entry.js.map → p-f202ffb4.entry.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as r,H as e}from"./p-bdfa539c.js";const t='@charset "UTF-8";limel-popover{display:flex;--popover-surface-width:min(calc(100vw - 4rem), 22rem)}button[slot=trigger]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-sizing:border-box;display:flex;align-items:center;justify-content:center;color:rgb(var(--color-sky-default));border-radius:50%;box-shadow:0 0 0 1px rgb(var(--color-sky-lighter), 0.7);width:0.875rem;height:0.875rem;font-size:0.75rem}button[slot=trigger]:hover,button[slot=trigger]:focus,button[slot=trigger]:focus-visible{will-change:color, background-color, box-shadow, transform}button[slot=trigger]:hover,button[slot=trigger]:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-sky-dark));background-color:var(--lime-elevated-surface-background-color)}button[slot=trigger]:hover{box-shadow:var(--button-shadow-hovered)}button[slot=trigger]:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button[slot=trigger]:hover,button[slot=trigger]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button[slot=trigger]:focus{outline:none}button[slot=trigger]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button[slot=trigger].is-open{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default));box-shadow:var(--button-shadow-inset)}';const s=class{constructor(r){o(this,r);this.openPopover=o=>{o.stopPropagation();this.isOpen=true};this.onPopoverClose=o=>{o.stopPropagation();this.isOpen=false};this.value=undefined;this.trigger="?";this.readMoreLink=undefined;this.openDirection="top-start";this.isOpen=false}render(){return r(e,null,r("limel-popover",{open:this.isOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},r("button",{slot:"trigger",onClick:this.openPopover,class:{"is-open":this.isOpen}},this.trigger),r("limel-help-content",{value:this.value,readMoreLink:this.readMoreLink})))}};s.style=t;export{s as limel_help};
|
|
2
|
+
//# sourceMappingURL=p-c3f85d29.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["helpCss","HelpComponent","this","openPopover","event","stopPropagation","isOpen","onPopoverClose","render","h","Host","open","onClose","openDirection","slot","onClick","class","trigger","value","readMoreLink"],"sources":["./src/components/help/help.scss?tag=limel-help&encapsulation=shadow","./src/components/help/help.tsx"],"sourcesContent":["@use '../../style/mixins';\n\nlimel-popover {\n display: flex;\n --popover-surface-width: min(calc(100vw - 4rem), 22rem);\n}\n\nbutton[slot='trigger'] {\n all: unset;\n\n @include mixins.is-flat-clickable(\n $color--hovered: rgb(var(--color-sky-dark)),\n $background-color: var(--lime-elevated-surface-background-color)\n );\n @include mixins.visualize-keyboard-focus;\n\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgb(var(--color-sky-default));\n border-radius: 50%;\n box-shadow: 0 0 0 1px rgb(var(--color-sky-lighter), 0.7);\n width: 0.875rem;\n height: 0.875rem;\n font-size: 0.75rem;\n\n &.is-open {\n color: rgb(var(--color-white));\n background-color: rgb(var(--color-sky-default));\n box-shadow: var(--button-shadow-inset);\n }\n}\n","import { Component, h, Prop, State, Host } from '@stencil/core';\nimport { OpenDirection } from '../menu/menu.types';\nimport { Help } from '../help/help.types';\nimport { Link } from '../../global/shared-types/link.types';\n\n/**\n * A good design is self-explanatory! However, sometimes concepts are\n * too complex to understand, no matter how well-designed a user interface is.\n * In such cases, contextual help can be a great way to provide users with\n * help precisely where and when users need it.\n *\n * In app interface design, providing contextual help emerges as a viable practice\n * for enhancing user experience and usability.\n * Contextual help serves as a quick-to-access guiding,\n * empowering users to more easily understand and navigate through\n * the intricacies of an application.\n *\n * Using this component designers empower users to grasp the functionality\n * of an app more effortlessly, minimizes the learning curve,\n * transforming complex features into accessible opportunities for exploration.\n *\n * @exampleComponent limel-example-help\n * @exampleComponent limel-example-read-more\n * @exampleComponent limel-example-open-direction\n * @exampleComponent limel-example-placement\n */\n@Component({\n tag: 'limel-help',\n shadow: true,\n styleUrl: 'help.scss',\n})\nexport class HelpComponent implements Help {\n /**\n * {@inheritdoc Help.value}\n */\n @Prop()\n public value: string;\n\n /**\n * {@inheritdoc Help.trigger}\n */\n @Prop()\n public trigger: string = '?';\n\n /**\n * {@inheritdoc Help.readMoreLink}\n */\n @Prop()\n public readMoreLink?: Link;\n\n /**\n * {@inheritdoc Help.openDirection}\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection = 'top-start';\n\n @State()\n private isOpen = false;\n\n public render() {\n return (\n <Host>\n <limel-popover\n open={this.isOpen}\n onClose={this.onPopoverClose}\n openDirection={this.openDirection}\n >\n <button\n slot=\"trigger\"\n onClick={this.openPopover}\n class={{\n 'is-open': this.isOpen,\n }}\n >\n {this.trigger}\n </button>\n <limel-help-content\n value={this.value}\n readMoreLink={this.readMoreLink}\n />\n </limel-popover>\n </Host>\n );\n }\n\n private openPopover = (event: MouseEvent) => {\n event.stopPropagation();\n this.isOpen = true;\n };\n\n private onPopoverClose = (event: CustomEvent) => {\n event.stopPropagation();\n this.isOpen = false;\n };\n}\n"],"mappings":"kDAAA,MAAMA,EAAU,6yD,MC+BHC,EAAa,M,yBAsDdC,KAAAC,YAAeC,IACnBA,EAAMC,kBACNH,KAAKI,OAAS,IAAI,EAGdJ,KAAAK,eAAkBH,IACtBA,EAAMC,kBACNH,KAAKI,OAAS,KAAK,E,kCAlDE,I,+CAYa,Y,YAGrB,K,CAEVE,SACH,OACIC,EAACC,EAAI,KACDD,EAAA,iBACIE,KAAMT,KAAKI,OACXM,QAASV,KAAKK,eACdM,cAAeX,KAAKW,eAEpBJ,EAAA,UACIK,KAAK,UACLC,QAASb,KAAKC,YACda,MAAO,CACH,UAAWd,KAAKI,SAGnBJ,KAAKe,SAEVR,EAAA,sBACIS,MAAOhB,KAAKgB,MACZC,aAAcjB,KAAKiB,gB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dispatchResizeEvent","window","resizeEvent","UIEvent","view","detail","dispatchEvent","redrawComponents"],"sources":["./src/util/dispatch-resize-event.ts"],"sourcesContent":["/**\n * Dispatches a resize event on the window.\n *\n * @internal\n */\nexport const dispatchResizeEvent = () => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const resizeEvent = new UIEvent('resize', { view: window, detail: 0 });\n window.dispatchEvent(resizeEvent);\n};\n\n/**\n * Triggers a redraw of lime-elements components.\n *\n * Some components (like `limel-slider`, `limel-select`, and others using\n * Material Design Components internally) need to be visible during\n * initialization to render correctly. If a component is created while\n * hidden (e.g., inside a collapsed section or a closed dialog), it may\n * render incorrectly when made visible.\n *\n * Call this function after programmatically showing previously hidden\n * components to trigger their re-initialization.\n *\n * @example\n * ```tsx\n * import { redrawComponents } from '@limetech/lime-elements';\n *\n * // After showing a previously hidden element, wait for DOM update\n * this.showSlider = true;\n * requestAnimationFrame(() => {\n * redrawComponents();\n * });\n * ```\n *\n * @remarks\n * This function works by dispatching a `resize` event on the window,\n * which triggers the internal re-initialization logic in affected components.\n * It's safe to call and has minimal performance impact.\n *\n * Note: This function is a no-op in non-browser environments (SSR/tests).\n *\n * @public\n */\nexport const redrawComponents = (): void => {\n dispatchResizeEvent();\n};\n"],"mappings":"MAKaA,EAAsB,KAC/B,UAAWC,SAAW,YAAa,CAC/B,M,CAGJ,MAAMC,EAAc,IAAIC,QAAQ,SAAU,CAAEC,KAAMH,OAAQI,OAAQ,IAClEJ,OAAOK,cAAcJ,EAAY,E,MAmCxBK,EAAmB,KAC5BP,GAAqB,S"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as r,H as i}from"./p-bdfa539c.js";import{g as o}from"./p-d251f404.js";const a='@charset "UTF-8";:host(limel-header){display:flex;align-items:center;box-sizing:border-box;width:100%;background-color:var(--header-background-color, rgb(var(--contrast-300)));border-top-left-radius:var(--header-top-right-left-border-radius, 0.75rem);border-top-right-radius:var(--header-top-right-left-border-radius, 0.75rem);padding:0.25rem}.information{display:flex;flex-grow:1;align-items:center;min-width:0}.icon{--limel-icon-svg-margin:0.25rem;flex-shrink:0;color:var(--limel-header-icon-color, var(--header-icon-color, rgb(var(--contrast-1100))));background-color:var(--limel-header-icon-background-color, var(--header-icon-background-color, transparent));width:2.25rem;border-radius:0.56rem}.headings{min-width:0;margin-left:0.25rem}.heading,.subheading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;padding:0}.heading{color:var(--header-heading-color, rgb(var(--contrast-1100)));font-size:1rem;font-weight:500}.subheading{color:var(--header-subheading-color, rgb(var(--contrast-900)));font-size:var(--limel-theme-default-small-font-size);font-weight:400}.subheading__supporting-text{color:var(--header-supporting-text-color, var(--header-subheading-color))}.subheading__supporting-text span{margin:0 0.125rem}slot[name=actions]{flex-shrink:0}:host(limel-header.is-narrow){padding:0.125rem 0.25rem}:host(limel-header.is-narrow) .icon{--limel-icon-svg-margin:0;width:1.25rem}:host(limel-header.is-narrow) .heading{font-size:0.9375rem}:host(limel-header.has-responsive-layout){display:grid;grid-template-columns:repeat(auto-fit, minmax(clamp(50%, var(--header-responsive-breakpoint, 22rem), 100%), 1fr))}:host(limel-header.has-responsive-layout) .headings{padding-right:0.5rem}:host(limel-header.has-responsive-layout) slot[name=actions]{display:flex;justify-content:flex-end}';const n=class{constructor(r){e(this,r);this.icon=undefined;this.heading=undefined;this.subheading=undefined;this.supportingText=undefined;this.subheadingDivider="·"}render(){return r(i,null,r("div",{class:"information"},this.renderIcon(),r("div",{class:"headings"},r("h1",{class:"heading",title:this.heading},this.heading),r("h2",{class:"subheading",title:this.subheading},this.subheading,this.renderSupportingText()))),r("slot",{name:"actions"},r("slot",null)))}renderIcon(){var e,i,a,n,t;const s=o(this.icon);if(!s){return}return r("limel-icon",{class:"icon",badge:true,name:s,style:{"--limel-header-icon-color":`${(i=(e=this.icon)===null||e===void 0?void 0:e.color)!==null&&i!==void 0?i:""}`,"--limel-header-icon-background-color":`${(n=(a=this.icon)===null||a===void 0?void 0:a.backgroundColor)!==null&&n!==void 0?n:""}`,title:`${(t=this.icon)===null||t===void 0?void 0:t.title}`}})}renderSupportingText(){if(!this.supportingText){return}return r("span",{class:"subheading__supporting-text"},this.renderSubheadingDivider(),this.supportingText)}renderSubheadingDivider(){if(!this.subheadingDivider){return}return r("span",null,this.subheadingDivider)}};n.style=a;export{n as limel_header};
|
|
2
|
+
//# sourceMappingURL=p-d3d4fe88.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["headerCss","Header","render","h","Host","class","this","renderIcon","title","heading","subheading","renderSupportingText","name","icon","getIconName","badge","style","_b","_a","color","_d","_c","backgroundColor","_e","supportingText","renderSubheadingDivider","subheadingDivider"],"sources":["./src/components/header/header.scss?tag=limel-header&encapsulation=shadow","./src/components/header/header.tsx"],"sourcesContent":["@use '../../style/mixins.scss';\n@use '../../style/functions.scss';\n\n/**\n * @prop --header-background-color: Background color of header, defaults to `--contrast-300`.\n * @prop --header-heading-color: Color of heading text, defaults to `--contrast-1100`.\n * @prop --header-subheading-color: Color of subheading text, defaults to `--contrast-900`.\n * @prop --header-supporting-text-color: Color of supporting text in subheading, defaults to `--header-subheading-color`.\n * @prop --header-top-right-left-border-radius: Top-left and top-right border radius of header, defaults to `0.75rem`.\n * @prop --header-responsive-breakpoint: Defines the minimum allowed `width` of both information and actions areas in the header, defaults to `22rem`.\n */\n\n:host(limel-header) {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n background-color: var(--header-background-color, rgb(var(--contrast-300)));\n border-top-left-radius: var(--header-top-right-left-border-radius, 0.75rem);\n border-top-right-radius: var(\n --header-top-right-left-border-radius,\n 0.75rem\n );\n padding: 0.25rem;\n}\n\n.information {\n display: flex;\n flex-grow: 1;\n align-items: center;\n min-width: 0;\n}\n\n.icon {\n --limel-icon-svg-margin: 0.25rem;\n flex-shrink: 0;\n color: var(\n --limel-header-icon-color,\n var(--header-icon-color, rgb(var(--contrast-1100)))\n );\n background-color: var(\n --limel-header-icon-background-color,\n var(--header-icon-background-color, transparent)\n );\n width: 2.25rem;\n border-radius: 0.56rem;\n}\n\n.headings {\n min-width: 0;\n margin-left: 0.25rem;\n}\n\n.heading,\n.subheading {\n @include mixins.truncate-text;\n margin: 0;\n padding: 0;\n}\n\n.heading {\n color: var(--header-heading-color, rgb(var(--contrast-1100)));\n font-size: 1rem;\n font-weight: 500;\n}\n\n.subheading {\n color: var(--header-subheading-color, rgb(var(--contrast-900)));\n font-size: var(--limel-theme-default-small-font-size);\n font-weight: 400;\n}\n\n.subheading__supporting-text {\n color: var(--header-supporting-text-color, var(--header-subheading-color));\n span {\n margin: 0 0.125rem;\n }\n}\n\nslot[name='actions'] {\n flex-shrink: 0;\n}\n\n:host(limel-header.is-narrow) {\n padding: 0.125rem 0.25rem;\n\n .icon {\n --limel-icon-svg-margin: 0;\n width: 1.25rem;\n }\n\n .heading {\n font-size: functions.pxToRem(15);\n }\n}\n\n:host(limel-header.has-responsive-layout) {\n display: grid;\n grid-template-columns: repeat(\n auto-fit,\n minmax(\n clamp(\n 50%,\n var(--header-responsive-breakpoint, functions.pxToRem(352)),\n 100%\n ),\n 1fr\n )\n );\n .headings {\n padding-right: 0.5rem;\n }\n slot[name='actions'] {\n display: flex;\n justify-content: flex-end;\n }\n}\n","import { Component, h, Prop, Host } from '@stencil/core';\nimport { Icon } from '../../global/shared-types/icon.types';\nimport { getIconName } from '../icon/get-icon-props';\n\n/**\n * A header is the top most visual element in a component, page, card, or a view.\n *\n * ## Usage\n * A header is the first thing that clarifies a context for users.\n * Due to their positions in the UI hierarchy, headers are the most\n * prominent elements of a user interface; and because of that, they carry both\n * vital information and fundamental controls for the area of the interface\n * they represent.\n *\n * For example, when a header is placed on top of a card, it should quickly\n * explain the card to the user. When placed on top of a modal, it should easily\n * clarify what the modal is about. When displayed on top of a fullscreen view,\n * it should indicate where in the system users are, and what part of the app\n * they are looking at.\n *\n *\n * ## Layout\n * The vital information in a header is usually manifested in form of an icon,\n * and a heading. A subheading also could be added to provide supplementary\n * information. There is also a third place for displaying supplementary information\n * or \"supporting text\", which will be rendered as a part of the subheading.\n * Along with this information, headers can also include actions, controls, or\n * menus.\n *\n * :::important\n * Such actions or menus must affect the entire section of the interface\n * which the header is representing. For example, a _Delete_ button on a card\n * header must delete that entire card and its respective contents all together,\n * not for example a selected item which is visible in the content of that card.\n * :::\n *\n *\n * :::warning\n * Do not user background color on icons in the headers. It is much better and\n * much easier for the eye if your icon itself has a color.\n * Background colors behind icons make them look like \"call to action\" buttons\n * and take a lot of attention from users.\n * :::\n *\n * @exampleComponent limel-example-header\n * @exampleComponent limel-example-header-slot-actions\n * @exampleComponent limel-example-header-colors\n * @exampleComponent limel-example-header-responsive\n * @exampleComponent limel-example-header-narrow\n * @slot actions - Content (actions) to be put inside the far right surface of\n * the header\n * @slot [no name] - DEPRECATED. The `actions` slot used to be unnamed. This\n * behavior has been deprecated, and support will be dropped in a future\n * version. Please add `slot=\"actions\"` to your elements to ensure your code\n * will continue to work with future versions of Lime Elements.\n */\n@Component({\n tag: 'limel-header',\n shadow: true,\n styleUrl: 'header.scss',\n})\nexport class Header {\n /**\n * Icon to display\n */\n @Prop()\n public icon?: string | Icon;\n\n /**\n * Title to display\n */\n @Prop()\n public heading?: string;\n\n /**\n * Subheading to display\n */\n @Prop()\n public subheading?: string;\n\n /**\n * An extra string of text to display along with with the Subheading\n */\n @Prop()\n public supportingText?: string;\n\n /**\n * The visual divider that separates the `subheading` and the `supportingText`.\n * It must be a single character such as `-` or `,`.\n */\n @Prop()\n public subheadingDivider?: string = '·';\n\n public render() {\n return (\n <Host>\n <div class=\"information\">\n {this.renderIcon()}\n <div class=\"headings\">\n <h1 class=\"heading\" title={this.heading}>\n {this.heading}\n </h1>\n <h2 class=\"subheading\" title={this.subheading}>\n {this.subheading}\n {this.renderSupportingText()}\n </h2>\n </div>\n </div>\n <slot name=\"actions\">\n <slot />\n </slot>\n </Host>\n );\n }\n\n private renderIcon() {\n const icon = getIconName(this.icon);\n\n if (!icon) {\n return;\n }\n\n return (\n <limel-icon\n class=\"icon\"\n badge={true}\n name={icon}\n style={{\n '--limel-header-icon-color': `${(this.icon as Icon)?.color ?? ''}`,\n '--limel-header-icon-background-color': `${\n (this.icon as Icon)?.backgroundColor ?? ''\n }`,\n title: `${(this.icon as Icon)?.title}`,\n }}\n />\n );\n }\n\n private renderSupportingText() {\n if (!this.supportingText) {\n return;\n }\n\n return (\n <span class=\"subheading__supporting-text\">\n {this.renderSubheadingDivider()}\n {this.supportingText}\n </span>\n );\n }\n\n private renderSubheadingDivider() {\n if (!this.subheadingDivider) {\n return;\n }\n\n return <span>{this.subheadingDivider}</span>;\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAY,8wD,MC6DLC,EAAM,M,mJA8BqB,G,CAE7BC,SACH,OACIC,EAACC,EAAI,KACDD,EAAA,OAAKE,MAAM,eACNC,KAAKC,aACNJ,EAAA,OAAKE,MAAM,YACPF,EAAA,MAAIE,MAAM,UAAUG,MAAOF,KAAKG,SAC3BH,KAAKG,SAEVN,EAAA,MAAIE,MAAM,aAAaG,MAAOF,KAAKI,YAC9BJ,KAAKI,WACLJ,KAAKK,0BAIlBR,EAAA,QAAMS,KAAK,WACPT,EAAA,c,CAMRI,a,cACJ,MAAMM,EAAOC,EAAYR,KAAKO,MAE9B,IAAKA,EAAM,CACP,M,CAGJ,OACIV,EAAA,cACIE,MAAM,OACNU,MAAO,KACPH,KAAMC,EACNG,MAAO,CACH,4BAA6B,IAAGC,GAAAC,EAACZ,KAAKO,QAAa,MAAAK,SAAA,SAAAA,EAAEC,SAAK,MAAAF,SAAA,EAAAA,EAAI,KAC9D,uCAAwC,IACpCG,GAAAC,EAACf,KAAKO,QAAa,MAAAQ,SAAA,SAAAA,EAAEC,mBAAe,MAAAF,SAAA,EAAAA,EAAI,KAE5CZ,MAAO,IAAGe,EAACjB,KAAKO,QAAa,MAAAU,SAAA,SAAAA,EAAEf,U,CAMvCG,uBACJ,IAAKL,KAAKkB,eAAgB,CACtB,M,CAGJ,OACIrB,EAAA,QAAME,MAAM,+BACPC,KAAKmB,0BACLnB,KAAKkB,e,CAKVC,0BACJ,IAAKnB,KAAKoB,kBAAmB,CACzB,M,CAGJ,OAAOvB,EAAA,YAAOG,KAAKoB,kB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,c as t,h as e,H as s}from"./p-bdfa539c.js";import{t as r}from"./p-df36e1ae.js";import{g as n,a,b as l,c as h}from"./p-89524e09.js";import"./p-d251f404.js";const o='@charset "UTF-8";:host(limel-file){position:relative}.drag-and-drop-tip{pointer-events:none;position:absolute;box-sizing:border-box;margin:0.25rem;inset:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;border-radius:0.25rem;border:1px dashed rgb(var(--contrast-700));padding:0 0.5rem}.drag-and-drop-tip .invisible-label-mock{flex-shrink:0;opacity:0;padding-right:1rem;padding-left:1.5rem}.drag-and-drop-tip .tip{font-size:smaller;color:var(--limel-theme-text-secondary-on-background-color);height:auto;max-height:3rem;line-height:1;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}';const d={id:null,text:null,removable:true};const p=class{constructor(e){i(this,e);this.change=t(this,"change",7);this.interact=t(this,"interact",7);this.dropZoneTip=()=>this.getTranslation("file.drag-and-drop-tips");this.handleNewFiles=i=>{this.preventAndStop(i);this.change.emit(i.detail[0])};this.handleChipSetChange=i=>{i.stopPropagation();const t=i.detail.length===0?i.detail[0]:null;if(!t){this.change.emit(t)}};this.handleChipInteract=i=>{this.preventAndStop(i);this.interact.emit(i.detail.id)};this.value=undefined;this.label=undefined;this.required=false;this.disabled=false;this.readonly=false;this.invalid=false;this.accept="*";this.language="en"}render(){return e(s,null,e("limel-file-dropzone",{disabled:this.disabled||this.readonly||!!this.value,accept:this.accept,onFilesSelected:this.handleNewFiles},this.renderChipset()),this.renderDragAndDropTip())}renderDragAndDropTip(){if(this.value||this.disabled||this.readonly){return}return e("div",{class:"drag-and-drop-tip"},e("span",{class:"invisible-label-mock",role:"presentation"},this.label),e("span",{class:"tip"},this.dropZoneTip()))}getChipArray(){if(!this.value){return[]}return[Object.assign(Object.assign({},d),{text:this.value.filename,id:this.value.id,icon:{name:n(this.value),title:a(this.value),color:l(this.value),backgroundColor:h(this.value)},href:this.value.href,menuItems:this.value.menuItems})]}renderChipset(){const i=e("limel-chip-set",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onInteract:this.handleChipInteract,required:this.required,type:"input",value:this.getChipArray()});if(this.value){return i}return e("limel-file-input",{accept:this.accept,disabled:this.disabled||this.readonly},i)}preventAndStop(i){i.stopPropagation();i.preventDefault()}getTranslation(i){return r.get(i,this.language)}};p.style=o;export{p as limel_file};
|
|
2
|
+
//# sourceMappingURL=p-d759e826.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fileCss","DEFAULT_FILE_CHIP","id","text","removable","File","this","dropZoneTip","getTranslation","handleNewFiles","event","preventAndStop","change","emit","detail","handleChipSetChange","stopPropagation","file","length","handleChipInteract","interact","render","h","Host","disabled","readonly","value","accept","onFilesSelected","renderChipset","renderDragAndDropTip","class","role","label","getChipArray","filename","icon","name","getFileIcon","title","getFileExtensionTitle","color","getFileColor","backgroundColor","getFileBackgroundColor","href","menuItems","chipset","invalid","leadingIcon","language","onChange","onInteract","required","type","preventDefault","key","translate","get"],"sources":["./src/components/file/file.scss?tag=limel-file&encapsulation=shadow","./src/components/file/file.tsx"],"sourcesContent":["@use '../../style/mixins';\n\n/**\n * @prop --icon-background-color: Background color of the icon. Defaults to `--contrast-400`.\n * @prop --icon-color: Color of the icon. Defaults to `--contrast-1100`.\n */\n\n:host(limel-file) {\n position: relative;\n}\n\n.drag-and-drop-tip {\n pointer-events: none;\n position: absolute;\n box-sizing: border-box;\n margin: 0.25rem;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: nowrap;\n\n border-radius: 0.25rem;\n border: 1px dashed rgb(var(--contrast-700));\n\n padding: 0 0.5rem;\n\n .invisible-label-mock {\n flex-shrink: 0;\n opacity: 0;\n padding-right: 1rem;\n padding-left: 1.5rem;\n }\n\n .tip {\n font-size: smaller;\n color: var(--limel-theme-text-secondary-on-background-color);\n\n // Below tries to render text in two lines,\n // and then truncate if there is no more space\n height: auto;\n max-height: 3rem;\n line-height: 1;\n @include mixins.truncate-text-on-line(2);\n }\n}\n","import translate from '../../global/translations';\nimport { Chip } from '../chip-set/chip.types';\nimport { Languages } from '../date-picker/date.types';\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport {\n getFileBackgroundColor,\n getFileColor,\n getFileExtensionTitle,\n getFileIcon,\n} from '../../util/file-metadata';\nimport { FileInfo } from '../../global/shared-types/file.types';\n\nconst DEFAULT_FILE_CHIP: Chip = {\n id: null,\n text: null,\n removable: true,\n};\n\n/**\n * This component lets end-users select a *single* file from their device\n * storage. Regardless of the user's device or operating system, this component\n * opens up a file picker dialog that allows the user to choose a file.\n *\n * ## Using correct labels\n *\n * This file picker can be used in different contexts. The component's distinct\n * visual design including the upload icon hints end-users that this is not a\n * normal input field like other fields in the form for example.\n *\n * :::important\n * you need to use a descriptive `label` that clarifies the\n * functionality of the file picker, and/or provides users with clear\n * instructions.\n *\n * Depending on the context, you may need to avoid labels such as:\n * - File\n * - Document\n *\n * and instead consider using labels like:\n * - Attach a file\n * - Upload a file\n * - Choose a document\n * - Choose a file\n *\n * and similar phrases...\n * :::\n *\n * @exampleComponent limel-example-file\n * @exampleComponent limel-example-file-custom-icon\n * @exampleComponent limel-example-file-menu-items\n * @exampleComponent limel-example-file-accepted-types\n * @exampleComponent limel-example-file-composite\n */\n@Component({\n tag: 'limel-file',\n shadow: true,\n styleUrl: 'file.scss',\n})\nexport class File {\n /**\n * The selected file.\n */\n @Prop()\n public value: FileInfo;\n\n /**\n * The input label.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Set to `true` to indicate that the field is required.\n */\n @Prop({ reflect: true })\n public required: boolean = false;\n\n /**\n * True if the input should be disabled\n */\n @Prop({ reflect: true })\n public disabled: boolean = false;\n\n /**\n * Set to `true` to disable adding and removing files, but allow interaction\n * with any already existing file.\n */\n @Prop({ reflect: true })\n public readonly: boolean = false;\n\n /**\n * Set to `true` to indicate that the current value of the chosen file is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * The [accepted file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers)\n */\n @Prop({ reflect: true })\n public accept: string = '*';\n\n /**\n * Defines the localisation for translations.\n */\n @Prop()\n public language: Languages = 'en';\n\n /**\n * Dispatched when a file is selected/deselected\n */\n @Event()\n private change: EventEmitter<FileInfo>;\n\n /**\n * Dispatched when clicking on a chip\n */\n @Event()\n private interact: EventEmitter<number | string>;\n\n public render() {\n return (\n <Host>\n <limel-file-dropzone\n disabled={this.disabled || this.readonly || !!this.value}\n accept={this.accept}\n onFilesSelected={this.handleNewFiles}\n >\n {this.renderChipset()}\n </limel-file-dropzone>\n {this.renderDragAndDropTip()}\n </Host>\n );\n }\n\n private renderDragAndDropTip() {\n if (this.value || this.disabled || this.readonly) {\n return;\n }\n\n return (\n <div class=\"drag-and-drop-tip\">\n <span class=\"invisible-label-mock\" role=\"presentation\">\n {this.label}\n </span>\n <span class=\"tip\">{this.dropZoneTip()}</span>\n </div>\n );\n }\n\n private dropZoneTip = (): string => {\n return this.getTranslation('file.drag-and-drop-tips');\n };\n\n private handleNewFiles = (event: CustomEvent<FileInfo[]>) => {\n this.preventAndStop(event);\n this.change.emit(event.detail[0]);\n };\n\n private getChipArray(): Chip[] {\n if (!this.value) {\n return [];\n }\n\n return [\n {\n ...DEFAULT_FILE_CHIP,\n text: this.value.filename,\n id: this.value.id,\n icon: {\n name: getFileIcon(this.value),\n title: getFileExtensionTitle(this.value),\n color: getFileColor(this.value),\n backgroundColor: getFileBackgroundColor(this.value),\n },\n href: this.value.href,\n menuItems: this.value.menuItems,\n },\n ];\n }\n\n private renderChipset() {\n const chipset = (\n <limel-chip-set\n disabled={this.disabled}\n readonly={this.readonly}\n invalid={this.invalid}\n label={this.label}\n leadingIcon=\"upload_to_cloud\"\n language={this.language}\n onChange={this.handleChipSetChange}\n onInteract={this.handleChipInteract}\n required={this.required}\n type=\"input\"\n value={this.getChipArray()}\n />\n );\n\n if (this.value) {\n return chipset;\n }\n\n return (\n <limel-file-input\n accept={this.accept}\n disabled={this.disabled || this.readonly}\n >\n {chipset}\n </limel-file-input>\n );\n }\n\n private handleChipSetChange = (event: CustomEvent) => {\n event.stopPropagation();\n const file = event.detail.length === 0 ? event.detail[0] : null;\n if (!file) {\n this.change.emit(file);\n }\n };\n\n private handleChipInteract = (event: CustomEvent<Chip>) => {\n this.preventAndStop(event);\n this.interact.emit(event.detail.id);\n };\n\n private preventAndStop(event: Event) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n private getTranslation(key: string) {\n return translate.get(key, this.language);\n }\n}\n"],"mappings":"yKAAA,MAAMA,EAAU,0pBCYhB,MAAMC,EAA0B,CAC5BC,GAAI,KACJC,KAAM,KACNC,UAAW,M,MA2CFC,EAAI,M,2FA6FLC,KAAAC,YAAc,IACXD,KAAKE,eAAe,2BAGvBF,KAAAG,eAAkBC,IACtBJ,KAAKK,eAAeD,GACpBJ,KAAKM,OAAOC,KAAKH,EAAMI,OAAO,GAAG,EAwD7BR,KAAAS,oBAAuBL,IAC3BA,EAAMM,kBACN,MAAMC,EAAOP,EAAMI,OAAOI,SAAW,EAAIR,EAAMI,OAAO,GAAK,KAC3D,IAAKG,EAAM,CACPX,KAAKM,OAAOC,KAAKI,E,GAIjBX,KAAAa,mBAAsBT,IAC1BJ,KAAKK,eAAeD,GACpBJ,KAAKc,SAASP,KAAKH,EAAMI,OAAOZ,GAAG,E,wDApJZ,M,cAMA,M,cAOA,M,aAOV,M,YAMO,I,cAMK,I,CActBmB,SACH,OACIC,EAACC,EAAI,KACDD,EAAA,uBACIE,SAAUlB,KAAKkB,UAAYlB,KAAKmB,YAAcnB,KAAKoB,MACnDC,OAAQrB,KAAKqB,OACbC,gBAAiBtB,KAAKG,gBAErBH,KAAKuB,iBAETvB,KAAKwB,uB,CAKVA,uBACJ,GAAIxB,KAAKoB,OAASpB,KAAKkB,UAAYlB,KAAKmB,SAAU,CAC9C,M,CAGJ,OACIH,EAAA,OAAKS,MAAM,qBACPT,EAAA,QAAMS,MAAM,uBAAuBC,KAAK,gBACnC1B,KAAK2B,OAEVX,EAAA,QAAMS,MAAM,OAAOzB,KAAKC,e,CAc5B2B,eACJ,IAAK5B,KAAKoB,MAAO,CACb,MAAO,E,CAGX,MAAO,C,+BAEIzB,GAAiB,CACpBE,KAAMG,KAAKoB,MAAMS,SACjBjC,GAAII,KAAKoB,MAAMxB,GACfkC,KAAM,CACFC,KAAMC,EAAYhC,KAAKoB,OACvBa,MAAOC,EAAsBlC,KAAKoB,OAClCe,MAAOC,EAAapC,KAAKoB,OACzBiB,gBAAiBC,EAAuBtC,KAAKoB,QAEjDmB,KAAMvC,KAAKoB,MAAMmB,KACjBC,UAAWxC,KAAKoB,MAAMoB,Y,CAK1BjB,gBACJ,MAAMkB,EACFzB,EAAA,kBACIE,SAAUlB,KAAKkB,SACfC,SAAUnB,KAAKmB,SACfuB,QAAS1C,KAAK0C,QACdf,MAAO3B,KAAK2B,MACZgB,YAAY,kBACZC,SAAU5C,KAAK4C,SACfC,SAAU7C,KAAKS,oBACfqC,WAAY9C,KAAKa,mBACjBkC,SAAU/C,KAAK+C,SACfC,KAAK,QACL5B,MAAOpB,KAAK4B,iBAIpB,GAAI5B,KAAKoB,MAAO,CACZ,OAAOqB,C,CAGX,OACIzB,EAAA,oBACIK,OAAQrB,KAAKqB,OACbH,SAAUlB,KAAKkB,UAAYlB,KAAKmB,UAE/BsB,E,CAkBLpC,eAAeD,GACnBA,EAAMM,kBACNN,EAAM6C,gB,CAGF/C,eAAegD,GACnB,OAAOC,EAAUC,IAAIF,EAAKlD,KAAK4C,S"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,g as o}from"./p-bdfa539c.js";import{d as
|
|
1
|
+
import{r as i,c as t,h as e,g as o}from"./p-bdfa539c.js";import{d as n}from"./p-cb892352.js";import{c as a}from"./p-ad52787a.js";import{_ as d,a as c,M as r,c as l,b as s,m,d as g}from"./p-9f722992.js";import{M as h}from"./p-5a478c15.js";import{A as u}from"./p-48105d44.js";import{i as f}from"./p-6ebb1f7c.js";import"./p-2cdaeb7b.js";import"./p-eda23c05.js";import"./p-c93050d6.js";import"./p-4c3358cb.js";import"./p-0b1af919.js";import"./p-858c6b82.js";import"./p-9acf7b5d.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2016 Google Inc.
|
|
@@ -42,7 +42,7 @@ import{r as i,c as t,h as e,g as o}from"./p-bdfa539c.js";import{d as a}from"./p-
|
|
|
42
42
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
43
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
44
44
|
* THE SOFTWARE.
|
|
45
|
-
*/var y="mdc-dom-focus-sentinel";var w=function(){function i(i,t){if(t===void 0){t={}}this.root=i;this.options=t;this.elFocusedBeforeTrapFocus=null}i.prototype.trapFocus=function(){var i=this.getFocusableElements(this.root);if(i.length===0){throw new Error("FocusTrap: Element must have at least one focusable child.")}this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null;this.wrapTabFocus(this.root);if(!this.options.skipInitialFocus){this.focusInitialElement(i,this.options.initialFocusEl)}};i.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+y)).forEach((function(i){i.parentElement.removeChild(i)}));if(!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus){this.elFocusedBeforeTrapFocus.focus()}};i.prototype.wrapTabFocus=function(i){var t=this;var e=this.createSentinel();var o=this.createSentinel();e.addEventListener("focus",(function(){var e=t.getFocusableElements(i);if(e.length>0){e[e.length-1].focus()}}));o.addEventListener("focus",(function(){var e=t.getFocusableElements(i);if(e.length>0){e[0].focus()}}));i.insertBefore(e,i.children[0]);i.appendChild(o)};i.prototype.focusInitialElement=function(i,t){var e=0;if(t){e=Math.max(i.indexOf(t),0)}i[e].focus()};i.prototype.getFocusableElements=function(i){var t=[].slice.call(i.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));return t.filter((function(i){var t=i.getAttribute("aria-disabled")==="true"||i.getAttribute("disabled")!=null||i.getAttribute("hidden")!=null||i.getAttribute("aria-hidden")==="true";var e=i.tabIndex>=0&&i.getBoundingClientRect().width>0&&!i.classList.contains(y)&&!t;var o=false;if(e){var
|
|
45
|
+
*/var y="mdc-dom-focus-sentinel";var w=function(){function i(i,t){if(t===void 0){t={}}this.root=i;this.options=t;this.elFocusedBeforeTrapFocus=null}i.prototype.trapFocus=function(){var i=this.getFocusableElements(this.root);if(i.length===0){throw new Error("FocusTrap: Element must have at least one focusable child.")}this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null;this.wrapTabFocus(this.root);if(!this.options.skipInitialFocus){this.focusInitialElement(i,this.options.initialFocusEl)}};i.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+y)).forEach((function(i){i.parentElement.removeChild(i)}));if(!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus){this.elFocusedBeforeTrapFocus.focus()}};i.prototype.wrapTabFocus=function(i){var t=this;var e=this.createSentinel();var o=this.createSentinel();e.addEventListener("focus",(function(){var e=t.getFocusableElements(i);if(e.length>0){e[e.length-1].focus()}}));o.addEventListener("focus",(function(){var e=t.getFocusableElements(i);if(e.length>0){e[0].focus()}}));i.insertBefore(e,i.children[0]);i.appendChild(o)};i.prototype.focusInitialElement=function(i,t){var e=0;if(t){e=Math.max(i.indexOf(t),0)}i[e].focus()};i.prototype.getFocusableElements=function(i){var t=[].slice.call(i.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));return t.filter((function(i){var t=i.getAttribute("aria-disabled")==="true"||i.getAttribute("disabled")!=null||i.getAttribute("hidden")!=null||i.getAttribute("aria-hidden")==="true";var e=i.tabIndex>=0&&i.getBoundingClientRect().width>0&&!i.classList.contains(y)&&!t;var o=false;if(e){var n=getComputedStyle(i);o=n.display==="none"||n.visibility==="hidden"}return e&&!o}))};i.prototype.createSentinel=function(){var i=document.createElement("div");i.setAttribute("tabindex","0");i.setAttribute("aria-hidden","true");i.classList.add(y);return i};return i}();
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2016 Google Inc.
|
|
@@ -86,7 +86,7 @@ import{r as i,c as t,h as e,g as o}from"./p-bdfa539c.js";import{d as a}from"./p-
|
|
|
86
86
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
87
87
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
88
88
|
* THE SOFTWARE.
|
|
89
|
-
*/var k;(function(i){i["POLL_SCROLL_POS"]="poll_scroll_position";i["POLL_LAYOUT_CHANGE"]="poll_layout_change"})(k||(k={}));var O=function(i){d(t,i);function t(e){var o=i.call(this,c(c({},t.defaultAdapter),e))||this;o.dialogOpen=false;o.isFullscreen=false;o.animationFrame=0;o.animationTimer=0;o.escapeKeyAction=C.CLOSE_ACTION;o.scrimClickAction=C.CLOSE_ACTION;o.autoStackButtons=true;o.areButtonsStacked=false;o.suppressDefaultPressSelector=C.SUPPRESS_DEFAULT_PRESS_SELECTOR;o.animFrame=new u;o.contentScrollHandler=function(){o.handleScrollEvent()};o.windowResizeHandler=function(){o.layout()};o.windowOrientationChangeHandler=function(){o.layout()};return o}Object.defineProperty(t,"cssClasses",{get:function(){return E},enumerable:false,configurable:true});Object.defineProperty(t,"strings",{get:function(){return C},enumerable:false,configurable:true});Object.defineProperty(t,"numbers",{get:function(){return T},enumerable:false,configurable:true});Object.defineProperty(t,"defaultAdapter",{get:function(){return{addBodyClass:function(){return undefined},addClass:function(){return undefined},areButtonsStacked:function(){return false},clickDefaultButton:function(){return undefined},eventTargetMatches:function(){return false},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return false},isContentScrollable:function(){return false},notifyClosed:function(){return undefined},notifyClosing:function(){return undefined},notifyOpened:function(){return undefined},notifyOpening:function(){return undefined},releaseFocus:function(){return undefined},removeBodyClass:function(){return undefined},removeClass:function(){return undefined},reverseButtons:function(){return undefined},trapFocus:function(){return undefined},registerContentEventHandler:function(){return undefined},deregisterContentEventHandler:function(){return undefined},isScrollableContentAtTop:function(){return false},isScrollableContentAtBottom:function(){return false},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});t.prototype.init=function(){if(this.adapter.hasClass(E.STACKED)){this.setAutoStackButtons(false)}this.isFullscreen=this.adapter.hasClass(E.FULLSCREEN)};t.prototype.destroy=function(){if(this.animationTimer){clearTimeout(this.animationTimer);this.handleAnimationTimerEnd()}if(this.isFullscreen){this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler)}this.animFrame.cancelAll();this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler);this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)};t.prototype.open=function(i){var t=this;this.dialogOpen=true;this.adapter.notifyOpening();this.adapter.addClass(E.OPENING);if(this.isFullscreen){this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler)}if(i&&i.isAboveFullscreenDialog){this.adapter.addClass(E.SCRIM_HIDDEN)}this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler);this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler);this.runNextAnimationFrame((function(){t.adapter.addClass(E.OPEN);t.adapter.addBodyClass(E.SCROLL_LOCK);t.layout();t.animationTimer=setTimeout((function(){t.handleAnimationTimerEnd();t.adapter.trapFocus(t.adapter.getInitialFocusEl());t.adapter.notifyOpened()}),T.DIALOG_ANIMATION_OPEN_TIME_MS)}))};t.prototype.close=function(i){var t=this;if(i===void 0){i=""}if(!this.dialogOpen){return}this.dialogOpen=false;this.adapter.notifyClosing(i);this.adapter.addClass(E.CLOSING);this.adapter.removeClass(E.OPEN);this.adapter.removeBodyClass(E.SCROLL_LOCK);if(this.isFullscreen){this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler)}this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler);this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler);cancelAnimationFrame(this.animationFrame);this.animationFrame=0;clearTimeout(this.animationTimer);this.animationTimer=setTimeout((function(){t.adapter.releaseFocus();t.handleAnimationTimerEnd();t.adapter.notifyClosed(i)}),T.DIALOG_ANIMATION_CLOSE_TIME_MS)};t.prototype.showSurfaceScrim=function(){var i=this;this.adapter.addClass(E.SURFACE_SCRIM_SHOWING);this.runNextAnimationFrame((function(){i.adapter.addClass(E.SURFACE_SCRIM_SHOWN)}))};t.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(E.SURFACE_SCRIM_SHOWN);this.adapter.addClass(E.SURFACE_SCRIM_HIDING)};t.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(E.SURFACE_SCRIM_HIDING);this.adapter.removeClass(E.SURFACE_SCRIM_SHOWING)};t.prototype.isOpen=function(){return this.dialogOpen};t.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction};t.prototype.setEscapeKeyAction=function(i){this.escapeKeyAction=i};t.prototype.getScrimClickAction=function(){return this.scrimClickAction};t.prototype.setScrimClickAction=function(i){this.scrimClickAction=i};t.prototype.getAutoStackButtons=function(){return this.autoStackButtons};t.prototype.setAutoStackButtons=function(i){this.autoStackButtons=i};t.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector};t.prototype.setSuppressDefaultPressSelector=function(i){this.suppressDefaultPressSelector=i};t.prototype.layout=function(){var i=this;this.animFrame.request(k.POLL_LAYOUT_CHANGE,(function(){i.layoutInternal()}))};t.prototype.handleClick=function(i){var t=this.adapter.eventTargetMatches(i.target,C.SCRIM_SELECTOR);if(t&&this.scrimClickAction!==""){this.close(this.scrimClickAction)}else{var e=this.adapter.getActionFromEvent(i);if(e){this.close(e)}}};t.prototype.handleKeydown=function(i){var t=i.key==="Enter"||i.keyCode===13;if(!t){return}var e=this.adapter.getActionFromEvent(i);if(e){return}var o=i.composedPath?i.composedPath()[0]:i.target;var
|
|
89
|
+
*/var k;(function(i){i["POLL_SCROLL_POS"]="poll_scroll_position";i["POLL_LAYOUT_CHANGE"]="poll_layout_change"})(k||(k={}));var O=function(i){d(t,i);function t(e){var o=i.call(this,c(c({},t.defaultAdapter),e))||this;o.dialogOpen=false;o.isFullscreen=false;o.animationFrame=0;o.animationTimer=0;o.escapeKeyAction=C.CLOSE_ACTION;o.scrimClickAction=C.CLOSE_ACTION;o.autoStackButtons=true;o.areButtonsStacked=false;o.suppressDefaultPressSelector=C.SUPPRESS_DEFAULT_PRESS_SELECTOR;o.animFrame=new u;o.contentScrollHandler=function(){o.handleScrollEvent()};o.windowResizeHandler=function(){o.layout()};o.windowOrientationChangeHandler=function(){o.layout()};return o}Object.defineProperty(t,"cssClasses",{get:function(){return E},enumerable:false,configurable:true});Object.defineProperty(t,"strings",{get:function(){return C},enumerable:false,configurable:true});Object.defineProperty(t,"numbers",{get:function(){return T},enumerable:false,configurable:true});Object.defineProperty(t,"defaultAdapter",{get:function(){return{addBodyClass:function(){return undefined},addClass:function(){return undefined},areButtonsStacked:function(){return false},clickDefaultButton:function(){return undefined},eventTargetMatches:function(){return false},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return false},isContentScrollable:function(){return false},notifyClosed:function(){return undefined},notifyClosing:function(){return undefined},notifyOpened:function(){return undefined},notifyOpening:function(){return undefined},releaseFocus:function(){return undefined},removeBodyClass:function(){return undefined},removeClass:function(){return undefined},reverseButtons:function(){return undefined},trapFocus:function(){return undefined},registerContentEventHandler:function(){return undefined},deregisterContentEventHandler:function(){return undefined},isScrollableContentAtTop:function(){return false},isScrollableContentAtBottom:function(){return false},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});t.prototype.init=function(){if(this.adapter.hasClass(E.STACKED)){this.setAutoStackButtons(false)}this.isFullscreen=this.adapter.hasClass(E.FULLSCREEN)};t.prototype.destroy=function(){if(this.animationTimer){clearTimeout(this.animationTimer);this.handleAnimationTimerEnd()}if(this.isFullscreen){this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler)}this.animFrame.cancelAll();this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler);this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)};t.prototype.open=function(i){var t=this;this.dialogOpen=true;this.adapter.notifyOpening();this.adapter.addClass(E.OPENING);if(this.isFullscreen){this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler)}if(i&&i.isAboveFullscreenDialog){this.adapter.addClass(E.SCRIM_HIDDEN)}this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler);this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler);this.runNextAnimationFrame((function(){t.adapter.addClass(E.OPEN);t.adapter.addBodyClass(E.SCROLL_LOCK);t.layout();t.animationTimer=setTimeout((function(){t.handleAnimationTimerEnd();t.adapter.trapFocus(t.adapter.getInitialFocusEl());t.adapter.notifyOpened()}),T.DIALOG_ANIMATION_OPEN_TIME_MS)}))};t.prototype.close=function(i){var t=this;if(i===void 0){i=""}if(!this.dialogOpen){return}this.dialogOpen=false;this.adapter.notifyClosing(i);this.adapter.addClass(E.CLOSING);this.adapter.removeClass(E.OPEN);this.adapter.removeBodyClass(E.SCROLL_LOCK);if(this.isFullscreen){this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler)}this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler);this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler);cancelAnimationFrame(this.animationFrame);this.animationFrame=0;clearTimeout(this.animationTimer);this.animationTimer=setTimeout((function(){t.adapter.releaseFocus();t.handleAnimationTimerEnd();t.adapter.notifyClosed(i)}),T.DIALOG_ANIMATION_CLOSE_TIME_MS)};t.prototype.showSurfaceScrim=function(){var i=this;this.adapter.addClass(E.SURFACE_SCRIM_SHOWING);this.runNextAnimationFrame((function(){i.adapter.addClass(E.SURFACE_SCRIM_SHOWN)}))};t.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(E.SURFACE_SCRIM_SHOWN);this.adapter.addClass(E.SURFACE_SCRIM_HIDING)};t.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(E.SURFACE_SCRIM_HIDING);this.adapter.removeClass(E.SURFACE_SCRIM_SHOWING)};t.prototype.isOpen=function(){return this.dialogOpen};t.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction};t.prototype.setEscapeKeyAction=function(i){this.escapeKeyAction=i};t.prototype.getScrimClickAction=function(){return this.scrimClickAction};t.prototype.setScrimClickAction=function(i){this.scrimClickAction=i};t.prototype.getAutoStackButtons=function(){return this.autoStackButtons};t.prototype.setAutoStackButtons=function(i){this.autoStackButtons=i};t.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector};t.prototype.setSuppressDefaultPressSelector=function(i){this.suppressDefaultPressSelector=i};t.prototype.layout=function(){var i=this;this.animFrame.request(k.POLL_LAYOUT_CHANGE,(function(){i.layoutInternal()}))};t.prototype.handleClick=function(i){var t=this.adapter.eventTargetMatches(i.target,C.SCRIM_SELECTOR);if(t&&this.scrimClickAction!==""){this.close(this.scrimClickAction)}else{var e=this.adapter.getActionFromEvent(i);if(e){this.close(e)}}};t.prototype.handleKeydown=function(i){var t=i.key==="Enter"||i.keyCode===13;if(!t){return}var e=this.adapter.getActionFromEvent(i);if(e){return}var o=i.composedPath?i.composedPath()[0]:i.target;var n=this.suppressDefaultPressSelector?!this.adapter.eventTargetMatches(o,this.suppressDefaultPressSelector):true;if(t&&n){this.adapter.clickDefaultButton()}};t.prototype.handleDocumentKeydown=function(i){var t=i.key==="Escape"||i.keyCode===27;if(t&&this.escapeKeyAction!==""){this.close(this.escapeKeyAction)}};t.prototype.handleScrollEvent=function(){var i=this;this.animFrame.request(k.POLL_SCROLL_POS,(function(){i.toggleScrollDividerHeader();i.toggleScrollDividerFooter()}))};t.prototype.layoutInternal=function(){if(this.autoStackButtons){this.detectStackedButtons()}this.toggleScrollableClasses()};t.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0;this.adapter.removeClass(E.OPENING);this.adapter.removeClass(E.CLOSING)};t.prototype.runNextAnimationFrame=function(i){var t=this;cancelAnimationFrame(this.animationFrame);this.animationFrame=requestAnimationFrame((function(){t.animationFrame=0;clearTimeout(t.animationTimer);t.animationTimer=setTimeout(i,0)}))};t.prototype.detectStackedButtons=function(){this.adapter.removeClass(E.STACKED);var i=this.adapter.areButtonsStacked();if(i){this.adapter.addClass(E.STACKED)}if(i!==this.areButtonsStacked){this.adapter.reverseButtons();this.areButtonsStacked=i}};t.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(E.SCROLLABLE);if(this.adapter.isContentScrollable()){this.adapter.addClass(E.SCROLLABLE);if(this.isFullscreen){this.toggleScrollDividerHeader();this.toggleScrollDividerFooter()}}};t.prototype.toggleScrollDividerHeader=function(){if(!this.adapter.isScrollableContentAtTop()){this.adapter.addClass(E.SCROLL_DIVIDER_HEADER)}else if(this.adapter.hasClass(E.SCROLL_DIVIDER_HEADER)){this.adapter.removeClass(E.SCROLL_DIVIDER_HEADER)}};t.prototype.toggleScrollDividerFooter=function(){if(!this.adapter.isScrollableContentAtBottom()){this.adapter.addClass(E.SCROLL_DIVIDER_FOOTER)}else if(this.adapter.hasClass(E.SCROLL_DIVIDER_FOOTER)){this.adapter.removeClass(E.SCROLL_DIVIDER_FOOTER)}};return t}(r);
|
|
90
90
|
/**
|
|
91
91
|
* @license
|
|
92
92
|
* Copyright 2017 Google Inc.
|
|
@@ -108,5 +108,5 @@ import{r as i,c as t,h as e,g as o}from"./p-bdfa539c.js";import{d as a}from"./p-
|
|
|
108
108
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
109
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
110
110
|
* THE SOFTWARE.
|
|
111
|
-
*/var S=O.strings;var D=function(i){d(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}Object.defineProperty(t.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(i){this.foundation.setEscapeKeyAction(i)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(i){this.foundation.setScrimClickAction(i)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(i){this.foundation.setAutoStackButtons(i)},enumerable:false,configurable:true});t.attachTo=function(i){return new t(i)};t.prototype.initialize=function(i){var t,e;if(i===void 0){i=function(i,t){return new w(i,t)}}var o=this.root.querySelector(S.CONTAINER_SELECTOR);if(!o){throw new Error("Dialog component requires a "+S.CONTAINER_SELECTOR+" container element")}this.container=o;this.content=this.root.querySelector(S.CONTENT_SELECTOR);this.buttons=[].slice.call(this.root.querySelectorAll(S.BUTTON_SELECTOR));this.defaultButton=this.root.querySelector("["+S.BUTTON_DEFAULT_ATTRIBUTE+"]");this.focusTrapFactory=i;this.buttonRipples=[];try{for(var a=l(this.buttons),n=a.next();!n.done;n=a.next()){var d=n.value;this.buttonRipples.push(new h(d))}}catch(i){t={error:i}}finally{try{if(n&&!n.done&&(e=a.return))e.call(a)}finally{if(t)throw t.error}}};t.prototype.initialSyncWithDOM=function(){var i=this;this.focusTrap=p(this.container,this.focusTrapFactory,this.getInitialFocusEl()||undefined);this.handleClick=this.foundation.handleClick.bind(this.foundation);this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation);this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation);this.handleOpening=function(){document.addEventListener("keydown",i.handleDocumentKeydown)};this.handleClosing=function(){document.removeEventListener("keydown",i.handleDocumentKeydown)};this.listen("click",this.handleClick);this.listen("keydown",this.handleKeydown);this.listen(S.OPENING_EVENT,this.handleOpening);this.listen(S.CLOSING_EVENT,this.handleClosing)};t.prototype.destroy=function(){this.unlisten("click",this.handleClick);this.unlisten("keydown",this.handleKeydown);this.unlisten(S.OPENING_EVENT,this.handleOpening);this.unlisten(S.CLOSING_EVENT,this.handleClosing);this.handleClosing();this.buttonRipples.forEach((function(i){i.destroy()}));i.prototype.destroy.call(this)};t.prototype.layout=function(){this.foundation.layout()};t.prototype.open=function(){this.foundation.open()};t.prototype.close=function(i){if(i===void 0){i=""}this.foundation.close(i)};t.prototype.getDefaultFoundation=function(){var i=this;var t={addBodyClass:function(i){return document.body.classList.add(i)},addClass:function(t){return i.root.classList.add(t)},areButtonsStacked:function(){return v(i.buttons)},clickDefaultButton:function(){if(i.defaultButton&&!i.defaultButton.disabled){i.defaultButton.click()}},eventTargetMatches:function(i,t){return i?m(i,t):false},getActionFromEvent:function(i){if(!i.target){return""}var t=g(i.target,"["+S.ACTION_ATTRIBUTE+"]");return t&&t.getAttribute(S.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return i.getInitialFocusEl()},hasClass:function(t){return i.root.classList.contains(t)},isContentScrollable:function(){return _(i.content)},notifyClosed:function(t){return i.emit(S.CLOSED_EVENT,t?{action:t}:{})},notifyClosing:function(t){return i.emit(S.CLOSING_EVENT,t?{action:t}:{})},notifyOpened:function(){return i.emit(S.OPENED_EVENT,{})},notifyOpening:function(){return i.emit(S.OPENING_EVENT,{})},releaseFocus:function(){i.focusTrap.releaseFocus()},removeBodyClass:function(i){return document.body.classList.remove(i)},removeClass:function(t){return i.root.classList.remove(t)},reverseButtons:function(){i.buttons.reverse();i.buttons.forEach((function(i){i.parentElement.appendChild(i)}))},trapFocus:function(){i.focusTrap.trapFocus()},registerContentEventHandler:function(t,e){if(i.content instanceof HTMLElement){i.content.addEventListener(t,e)}},deregisterContentEventHandler:function(t,e){if(i.content instanceof HTMLElement){i.content.removeEventListener(t,e)}},isScrollableContentAtTop:function(){return b(i.content)},isScrollableContentAtBottom:function(){return x(i.content)},registerWindowEventHandler:function(i,t){window.addEventListener(i,t)},deregisterWindowEventHandler:function(i,t){window.removeEventListener(i,t)}};return new O(t)};t.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+S.INITIAL_FOCUS_ATTRIBUTE+"]")};return t}(s);const A='@charset "UTF-8";:host{--dialog-background-color:var(--lime-elevated-surface-background-color);--header-heading-color:var(--dialog-heading-title-color);--header-subheading-color:var(--dialog-heading-subtitle-color);--header-supporting-text-color:var(--dialog-heading-supporting-text-color);--header-icon-color:var(--dialog-heading-icon-color);--header-icon-background-color:var(--dialog-heading-icon-background-color)}.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0, 0, 0, 0.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-dialog__title-icon{}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media (max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog .mdc-dialog__container{}}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media (max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media (max-width: 720px) and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media (max-width: 720px) and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media (max-width: 720px) and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media (max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media (max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media (min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right;}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right;}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;-webkit-overflow-scrolling:touch}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px;}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0;}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left;}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog__content{font-family:inherit;font-size:var(--limel-theme-default-font-size)}.mdc-dialog{z-index:var(--dialog-z-index, 7);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}@media (max-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:16000px}}@media (max-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:calc(100% - 32px)}}@media (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:16000px}}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog.full-screen .mdc-dialog__container{}}@media (-ms-high-contrast: none) and (min-height: 16032px), (-ms-high-contrast: active) and (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__container{align-items:stretch;height:auto}}.mdc-dialog.full-screen .mdc-dialog__container{height:100%;width:100%}.mdc-dialog.full-screen .mdc-dialog__container .mdc-dialog__surface{height:100%;width:100%}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(var(--color-black), 0.4)}.mdc-dialog .mdc-dialog__container{height:100%;width:var(--dialog-width, auto)}.mdc-dialog .mdc-dialog__surface{width:var(--dialog-width, auto);height:var(--dialog-height, auto);background-color:var(--dialog-background-color);box-shadow:var(--shadow-depth-64);max-width:var(--dialog-max-width, calc(100vw - 2rem));max-height:var(--dialog-max-height, calc(100% - 2rem));border-radius:0.75rem}.mdc-dialog .mdc-dialog__content{--limel-top-edge-fade-height:var(--dialog-padding-top-bottom, 1.5rem);--limel-bottom-edge-fade-height:var(\n --dialog-padding-top-bottom,\n 1.5rem\n );--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);color:var(--limel-theme-on-surface-color);padding-left:var(--dialog-padding-left-right, min(1.25rem, 3vw));padding-right:var(--dialog-padding-left-right, min(1.25rem, 3vw))}#initialFocusElement{position:absolute;opacity:0;pointer-events:none;z-index:-1}slot[name=header]{display:none}slot[name=button]{display:flex;gap:0.5rem;width:100%;justify-content:flex-end}footer.mdc-dialog__actions{min-height:unset;padding:0.375rem}@media screen and (max-width: 760px){slot[name=button]{flex-direction:column-reverse}.mdc-dialog__actions{padding:min(1.5rem, 3vw);padding-top:1rem}}';const I=class{constructor(e){i(this,e);this.close=t(this,"close",7);this.closing=t(this,"closing",7);this.heading=undefined;this.fullscreen=false;this.open=false;this.closingActions={escapeKey:true,scrimClick:true};this.handleMdcOpened=this.handleMdcOpened.bind(this);this.handleMdcClosed=this.handleMdcClosed.bind(this);this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentWillLoad(){this.id=n()}componentDidLoad(){this.initialize()}initialize(){const i=this.host.shadowRoot.querySelector(".mdc-dialog");if(!i){return}this.mdcDialog=new D(i);if(this.open){this.mdcDialog.open()}this.mdcDialog.listen("MDCDialog:opened",this.handleMdcOpened);this.mdcDialog.listen("MDCDialog:closed",this.handleMdcClosed);this.mdcDialog.listen("MDCDialog:closing",this.handleMdcClosing);this.setClosingActions()}disconnectedCallback(){this.mdcDialog.unlisten("MDCDialog:opened",this.handleMdcOpened);this.mdcDialog.unlisten("MDCDialog:closed",this.handleMdcClosed);this.mdcDialog.unlisten("MDCDialog:closing",this.handleMdcClosing);this.mdcDialog.destroy()}render(){return e("div",{class:{"mdc-dialog":true,"full-screen":!!this.fullscreen},role:"alertdialog","aria-modal":"true","aria-labelledby":"limel-dialog-title-"+this.id,"aria-describedby":"limel-dialog-content-"+this.id},e("input",{hidden:true,id:"initialFocusEl"}),e("div",{class:"mdc-dialog__container"},e("div",{class:"mdc-dialog__surface"},e("input",{type:"button",id:"initialFocusElement"}),this.renderHeading(),e("div",{class:"mdc-dialog__content",id:"limel-dialog-content-"+this.id},e("slot",null)),this.renderFooter())),e("div",{class:"mdc-dialog__scrim"}))}watchHandler(i,t){if(t===i){return}if(!this.mdcDialog){return}if(i){this.mdcDialog.open()}else{this.mdcDialog.close()}}closingActionsChanged(i,t){if(f(i,t)){return}this.setClosingActions()}handleMdcOpened(){const i=100;setTimeout(a,i)}handleMdcClosed(){if(this.open){this.close.emit()}this.open=false}handleMdcClosing(){this.closing.emit()}isDialogHeadingObject(i){return typeof i==="object"&&!!i.title}renderHeading(){if(this.isDialogHeadingObject(this.heading)){const{title:i,subtitle:t,supportingText:o,icon:a}=this.heading;return e("limel-header",{icon:a,heading:i,subheading:t,supportingText:o},e("slot",{name:"header-actions",slot:"actions"}))}else if(typeof this.heading==="string"){return e("limel-header",{heading:this.heading},e("slot",{name:"header-actions",slot:"actions"}))}return null}renderFooter(){return e("footer",{class:"mdc-dialog__actions"},e("slot",{name:"button"}))}setClosingActions(){this.mdcDialog.scrimClickAction="";if(this.closingActions.scrimClick){this.mdcDialog.scrimClickAction="close"}this.mdcDialog.escapeKeyAction="";if(this.closingActions.escapeKey){this.mdcDialog.escapeKeyAction="close"}}get host(){return o(this)}static get watchers(){return{open:["watchHandler"],closingActions:["closingActionsChanged"]}}};I.style=A;export{I as limel_dialog};
|
|
112
|
-
//# sourceMappingURL=p-
|
|
111
|
+
*/var S=O.strings;var D=function(i){d(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}Object.defineProperty(t.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(i){this.foundation.setEscapeKeyAction(i)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(i){this.foundation.setScrimClickAction(i)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(i){this.foundation.setAutoStackButtons(i)},enumerable:false,configurable:true});t.attachTo=function(i){return new t(i)};t.prototype.initialize=function(i){var t,e;if(i===void 0){i=function(i,t){return new w(i,t)}}var o=this.root.querySelector(S.CONTAINER_SELECTOR);if(!o){throw new Error("Dialog component requires a "+S.CONTAINER_SELECTOR+" container element")}this.container=o;this.content=this.root.querySelector(S.CONTENT_SELECTOR);this.buttons=[].slice.call(this.root.querySelectorAll(S.BUTTON_SELECTOR));this.defaultButton=this.root.querySelector("["+S.BUTTON_DEFAULT_ATTRIBUTE+"]");this.focusTrapFactory=i;this.buttonRipples=[];try{for(var n=l(this.buttons),a=n.next();!a.done;a=n.next()){var d=a.value;this.buttonRipples.push(new h(d))}}catch(i){t={error:i}}finally{try{if(a&&!a.done&&(e=n.return))e.call(n)}finally{if(t)throw t.error}}};t.prototype.initialSyncWithDOM=function(){var i=this;this.focusTrap=p(this.container,this.focusTrapFactory,this.getInitialFocusEl()||undefined);this.handleClick=this.foundation.handleClick.bind(this.foundation);this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation);this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation);this.handleOpening=function(){document.addEventListener("keydown",i.handleDocumentKeydown)};this.handleClosing=function(){document.removeEventListener("keydown",i.handleDocumentKeydown)};this.listen("click",this.handleClick);this.listen("keydown",this.handleKeydown);this.listen(S.OPENING_EVENT,this.handleOpening);this.listen(S.CLOSING_EVENT,this.handleClosing)};t.prototype.destroy=function(){this.unlisten("click",this.handleClick);this.unlisten("keydown",this.handleKeydown);this.unlisten(S.OPENING_EVENT,this.handleOpening);this.unlisten(S.CLOSING_EVENT,this.handleClosing);this.handleClosing();this.buttonRipples.forEach((function(i){i.destroy()}));i.prototype.destroy.call(this)};t.prototype.layout=function(){this.foundation.layout()};t.prototype.open=function(){this.foundation.open()};t.prototype.close=function(i){if(i===void 0){i=""}this.foundation.close(i)};t.prototype.getDefaultFoundation=function(){var i=this;var t={addBodyClass:function(i){return document.body.classList.add(i)},addClass:function(t){return i.root.classList.add(t)},areButtonsStacked:function(){return v(i.buttons)},clickDefaultButton:function(){if(i.defaultButton&&!i.defaultButton.disabled){i.defaultButton.click()}},eventTargetMatches:function(i,t){return i?m(i,t):false},getActionFromEvent:function(i){if(!i.target){return""}var t=g(i.target,"["+S.ACTION_ATTRIBUTE+"]");return t&&t.getAttribute(S.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return i.getInitialFocusEl()},hasClass:function(t){return i.root.classList.contains(t)},isContentScrollable:function(){return _(i.content)},notifyClosed:function(t){return i.emit(S.CLOSED_EVENT,t?{action:t}:{})},notifyClosing:function(t){return i.emit(S.CLOSING_EVENT,t?{action:t}:{})},notifyOpened:function(){return i.emit(S.OPENED_EVENT,{})},notifyOpening:function(){return i.emit(S.OPENING_EVENT,{})},releaseFocus:function(){i.focusTrap.releaseFocus()},removeBodyClass:function(i){return document.body.classList.remove(i)},removeClass:function(t){return i.root.classList.remove(t)},reverseButtons:function(){i.buttons.reverse();i.buttons.forEach((function(i){i.parentElement.appendChild(i)}))},trapFocus:function(){i.focusTrap.trapFocus()},registerContentEventHandler:function(t,e){if(i.content instanceof HTMLElement){i.content.addEventListener(t,e)}},deregisterContentEventHandler:function(t,e){if(i.content instanceof HTMLElement){i.content.removeEventListener(t,e)}},isScrollableContentAtTop:function(){return b(i.content)},isScrollableContentAtBottom:function(){return x(i.content)},registerWindowEventHandler:function(i,t){window.addEventListener(i,t)},deregisterWindowEventHandler:function(i,t){window.removeEventListener(i,t)}};return new O(t)};t.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+S.INITIAL_FOCUS_ATTRIBUTE+"]")};return t}(s);const A='@charset "UTF-8";:host{--dialog-background-color:var(--lime-elevated-surface-background-color);--header-heading-color:var(--dialog-heading-title-color);--header-subheading-color:var(--dialog-heading-subtitle-color);--header-supporting-text-color:var(--dialog-heading-supporting-text-color);--header-icon-color:var(--dialog-heading-icon-color);--header-icon-background-color:var(--dialog-heading-icon-background-color)}.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0, 0, 0, 0.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-dialog__title-icon{}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media (max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog .mdc-dialog__container{}}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media (max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media (max-width: 720px) and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media (max-width: 720px) and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media (max-width: 720px) and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media (max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media (max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media (min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right;}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right;}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;-webkit-overflow-scrolling:touch}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px;}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0;}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left;}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog__content{font-family:inherit;font-size:var(--limel-theme-default-font-size)}.mdc-dialog{z-index:var(--dialog-z-index, 7);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}@media (max-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:16000px}}@media (max-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:calc(100% - 32px)}}@media (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:16000px}}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog.full-screen .mdc-dialog__container{}}@media (-ms-high-contrast: none) and (min-height: 16032px), (-ms-high-contrast: active) and (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__container{align-items:stretch;height:auto}}.mdc-dialog.full-screen .mdc-dialog__container{height:100%;width:100%}.mdc-dialog.full-screen .mdc-dialog__container .mdc-dialog__surface{height:100%;width:100%}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(var(--color-black), 0.4)}.mdc-dialog .mdc-dialog__container{height:100%;width:var(--dialog-width, auto)}.mdc-dialog .mdc-dialog__surface{width:var(--dialog-width, auto);height:var(--dialog-height, auto);background-color:var(--dialog-background-color);box-shadow:var(--shadow-depth-64);max-width:var(--dialog-max-width, calc(100vw - 2rem));max-height:var(--dialog-max-height, calc(100% - 2rem));border-radius:0.75rem}.mdc-dialog .mdc-dialog__content{--limel-top-edge-fade-height:var(--dialog-padding-top-bottom, 1.5rem);--limel-bottom-edge-fade-height:var(\n --dialog-padding-top-bottom,\n 1.5rem\n );--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);color:var(--limel-theme-on-surface-color);padding-left:var(--dialog-padding-left-right, min(1.25rem, 3vw));padding-right:var(--dialog-padding-left-right, min(1.25rem, 3vw))}#initialFocusElement{position:absolute;opacity:0;pointer-events:none;z-index:-1}slot[name=header]{display:none}slot[name=button]{display:flex;gap:0.5rem;width:100%;justify-content:flex-end}footer.mdc-dialog__actions{min-height:unset;padding:0.375rem}@media screen and (max-width: 760px){slot[name=button]{flex-direction:column-reverse}.mdc-dialog__actions{padding:min(1.5rem, 3vw);padding-top:1rem}}';const I=class{constructor(e){i(this,e);this.close=t(this,"close",7);this.closing=t(this,"closing",7);this.heading=undefined;this.fullscreen=false;this.open=false;this.closingActions={escapeKey:true,scrimClick:true};this.handleMdcOpened=this.handleMdcOpened.bind(this);this.handleMdcClosed=this.handleMdcClosed.bind(this);this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentWillLoad(){this.id=a()}componentDidLoad(){this.initialize()}initialize(){const i=this.host.shadowRoot.querySelector(".mdc-dialog");if(!i){return}this.mdcDialog=new D(i);if(this.open){this.mdcDialog.open()}this.mdcDialog.listen("MDCDialog:opened",this.handleMdcOpened);this.mdcDialog.listen("MDCDialog:closed",this.handleMdcClosed);this.mdcDialog.listen("MDCDialog:closing",this.handleMdcClosing);this.setClosingActions()}disconnectedCallback(){this.mdcDialog.unlisten("MDCDialog:opened",this.handleMdcOpened);this.mdcDialog.unlisten("MDCDialog:closed",this.handleMdcClosed);this.mdcDialog.unlisten("MDCDialog:closing",this.handleMdcClosing);this.mdcDialog.destroy()}render(){return e("div",{class:{"mdc-dialog":true,"full-screen":!!this.fullscreen},role:"alertdialog","aria-modal":"true","aria-labelledby":"limel-dialog-title-"+this.id,"aria-describedby":"limel-dialog-content-"+this.id},e("input",{hidden:true,id:"initialFocusEl"}),e("div",{class:"mdc-dialog__container"},e("div",{class:"mdc-dialog__surface"},e("input",{type:"button",id:"initialFocusElement"}),this.renderHeading(),e("div",{class:"mdc-dialog__content",id:"limel-dialog-content-"+this.id},e("slot",null)),this.renderFooter())),e("div",{class:"mdc-dialog__scrim"}))}watchHandler(i,t){if(t===i){return}if(!this.mdcDialog){return}if(i){this.mdcDialog.open()}else{this.mdcDialog.close()}}closingActionsChanged(i,t){if(f(i,t)){return}this.setClosingActions()}handleMdcOpened(){const i=100;setTimeout(n,i)}handleMdcClosed(){if(this.open){this.close.emit()}this.open=false}handleMdcClosing(){this.closing.emit()}isDialogHeadingObject(i){return typeof i==="object"&&!!i.title}renderHeading(){if(this.isDialogHeadingObject(this.heading)){const{title:i,subtitle:t,supportingText:o,icon:n}=this.heading;return e("limel-header",{icon:n,heading:i,subheading:t,supportingText:o},e("slot",{name:"header-actions",slot:"actions"}))}else if(typeof this.heading==="string"){return e("limel-header",{heading:this.heading},e("slot",{name:"header-actions",slot:"actions"}))}return null}renderFooter(){return e("footer",{class:"mdc-dialog__actions"},e("slot",{name:"button"}))}setClosingActions(){this.mdcDialog.scrimClickAction="";if(this.closingActions.scrimClick){this.mdcDialog.scrimClickAction="close"}this.mdcDialog.escapeKeyAction="";if(this.closingActions.escapeKey){this.mdcDialog.escapeKeyAction="close"}}get host(){return o(this)}static get watchers(){return{open:["watchHandler"],closingActions:["closingActionsChanged"]}}};I.style=A;export{I as limel_dialog};
|
|
112
|
+
//# sourceMappingURL=p-f202ffb4.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,g as o,H as r}from"./p-bdfa539c.js";import{c as n}from"./p-ad52787a.js";import{m as a,r as s}from"./p-4e77c9a5.js";import{b as l,g as c,a as h}from"./p-d251f404.js";const d='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:var(--limel-theme-default-font-size);padding:0 0.25rem}button:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover,button:not([disabled]):focus,button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button:not([disabled]):hover,button:not([disabled]):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed)}button:not([disabled]):hover,button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}button.is-selected{color:var(--lime-primary-color, var(--limel-theme-primary-color)) !important}button.is-selected:not(:hover){box-shadow:var(--button-shadow-inset)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}hr{all:unset;width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){hr{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const b=class{constructor(i){t(this,i);this.select=e(this,"select",7);this.handleClick=t=>{t.stopPropagation();this.select.emit(this.item)};this.item=undefined;this.isVisible=true;this.selected=false;this.tooltipId=n()}componentWillLoad(){a(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){s(this.host)}render(){if(!this.isItem(this.item)&&this.item.separator){return i("hr",null)}return i("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled(),class:{"is-selected":this.isItem(this.item)&&this.item.selected}},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){if(this.isItem(this.item)&&this.item.disabled){return true}if(!this.isVisible){return true}}renderIcon(){if(this.isItem(this.item)&&!this.item.icon){return}if("icon"in this.item){const t=c(this.item.icon);const e=h(this.item.icon,this.item.iconColor);const o=l(this.item.icon);return i("limel-icon",{name:t,"aria-label":o,"aria-hidden":o?null:"true",style:{"--action-bar-item-icon-color":`${e}`}})}}renderLabel(){if(!this.isItem(this.item)||this.item.iconOnly){return}return i("span",{class:"text"},this.item.text)}renderTooltip(){if(!this.isItem(this.item)){return}return i("limel-tooltip",{elementId:this.tooltipId,label:this.getTooltipLabel(this.item),helperLabel:this.item.commandText})}getTooltipLabel(t){const e=l(t.icon);const i=t.text;if(e&&i){return`${e} ${i}`}return i}triggerIconColorWarning(){if(this.isItem(this.item)&&this.item.iconColor){console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}}get host(){return o(this)}};b.style=d;const m=class{constructor(o){t(this,o);this.select=e(this,"select",7);this.getOverflowTriggerContent=()=>{if(this.overFlowIcon){const{color:t,name:e,title:o}=this.overFlowIcon;return i("limel-icon",{style:{color:t},name:e,"aria-label":o})}return`+${this.numberOfMenuItems}`};this.handleSelect=t=>{t.stopPropagation();this.select.emit(t.detail)};this.items=undefined;this.openDirection="bottom-end";this.overFlowIcon=undefined}render(){return i(r,null,i("limel-menu",{openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},i("button",{slot:"trigger"},this.getOverflowTriggerContent())))}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{b as limel_action_bar_item,m as limel_action_bar_overflow_menu};
|
|
2
|
+
//# sourceMappingURL=p-f3180d48.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["actionBarItemCss","ActionBarButton","constructor","hostRef","this","handleClick","event","stopPropagation","select","emit","item","tooltipId","createRandomString","componentWillLoad","makeEnterClickable","host","componentDidLoad","triggerIconColorWarning","disconnectedCallback","removeEnterClickable","render","isItem","separator","h","id","type","onClick","disabled","isDisabled","class","selected","renderIcon","renderLabel","renderTooltip","isVisible","icon","name","getIconName","color","getIconColor","iconColor","title","getIconTitle","style","iconOnly","text","elementId","label","getTooltipLabel","helperLabel","commandText","iconTitle","tooltipLabel","console","warn","ActionBarOverflowMenu","getOverflowTriggerContent","overFlowIcon","numberOfMenuItems","handleSelect","detail","Host","openDirection","items","onSelect","slot","filter","isMenuItem","length"],"sources":["./src/components/action-bar/action-bar-item/action-bar-item.scss?tag=limel-action-bar-item","./src/components/action-bar/action-bar-item/action-bar-item.tsx","./src/components/action-bar/action-bar-item/action-bar-overflow-menu.tsx"],"sourcesContent":["@use '../../../style/mixins';\n@use '../../../style/functions';\n\nlimel-action-bar-item {\n transition: opacity 0.2s ease-in-out;\n position: relative;\n display: flex;\n align-items: center;\n\n &:not([is-visible]) {\n opacity: 0;\n pointer-events: none;\n }\n}\n\nbutton {\n all: unset;\n\n &:not([disabled]) {\n @include mixins.is-flat-inset-clickable(\n $color: var(--limel-action-bar-item-text-color),\n $color--hovered: var(--limel-action-bar-item-text-color),\n $background-color: var(--action-bar-background-color),\n $background-color--hovered: var(--action-bar-background-color),\n $background-color--inset: var(--action-bar-background-color)\n );\n @include mixins.visualize-keyboard-focus;\n }\n\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.25rem;\n\n width: 100%;\n min-width: var(--action-bar-item-height);\n max-width: var(--action-bar-item-max-width, 10rem);\n height: var(--action-bar-item-height);\n color: var(--limel-action-bar-item-text-color);\n\n border-radius: var(--action-bar-item-height);\n font-size: var(--limel-theme-default-font-size);\n padding: 0 0.25rem;\n\n &:has(.text) {\n padding: 0 0.5rem;\n }\n\n &[disabled] {\n opacity: 0.4;\n }\n\n &.is-selected {\n &:not(:hover) {\n box-shadow: var(--button-shadow-inset);\n }\n color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n ) !important;\n }\n}\n\n.text {\n @include mixins.truncate-text();\n padding: 0 0.25rem;\n}\n\nlimel-icon {\n flex-shrink: 0;\n width: calc(var(--action-bar-item-height) - 0.75rem);\n height: calc(var(--action-bar-item-height) - 0.75rem);\n color: var(\n --action-bar-item-icon-color,\n var(--limel-action-bar-item-text-color)\n );\n}\n\nhr {\n all: unset;\n width: 1px;\n height: 1.5rem;\n border-radius: var(--action-bar-item-height);\n background-color: var(--limel-action-bar-item-text-color);\n opacity: 0.2;\n\n @media (pointer: fine) {\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n }\n}\n\n// 👇 Overflow menu\n\nlimel-menu {\n --notification-badge-background-color: rgb(var(--contrast-600));\n --notification-badge-text-color: rgb(var(--contrast-1200));\n\n &[open] {\n button {\n box-shadow: var(--button-shadow-inset);\n }\n }\n}\n\nbutton[slot='trigger'] {\n animation: fade-in ease-out 0.25s;\n font-size: 0.75rem;\n font-weight: bold;\n transform: translate3d(0, 0, 0);\n}\n\n@keyframes fade-in {\n 0% {\n scale: 0.8;\n opacity: 0;\n }\n 100% {\n scale: 1;\n opacity: 1;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { ActionBarItem } from '../../action-bar/action-bar.types';\nimport { ListSeparator } from '../../list-item/list-item.types';\nimport { createRandomString } from '../../../util/random-string';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../../util/make-enter-clickable';\nimport {\n getIconColor,\n getIconName,\n getIconTitle,\n} from '../../icon/get-icon-props';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-action-bar-item',\n shadow: false,\n styleUrl: 'action-bar-item.scss',\n})\nexport class ActionBarButton {\n /**\n * Item that is placed in the action bar.\n */\n @Prop()\n public item!: ActionBarItem | ListSeparator;\n\n /**\n * Fired when a action bar item has been clicked.\n * @public\n */\n @Event()\n public select: EventEmitter<ActionBarItem | ListSeparator>;\n\n /**\n * When the item is displayed in the available width,\n * this will be `false`.\n */\n @Prop({ reflect: true })\n public isVisible: boolean = true;\n\n /**\n * When the item is selected, this will be `true`.\n */\n @Prop({ reflect: true })\n public selected: boolean = false;\n\n @Element()\n private readonly host: HTMLLimelActionBarItemElement;\n\n /**\n * Used to attach the right tooltip to the right button\n */\n private readonly tooltipId: string;\n\n constructor() {\n this.tooltipId = createRandomString();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.triggerIconColorWarning();\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public render() {\n if (!this.isItem(this.item) && this.item.separator) {\n return <hr />;\n }\n\n return (\n <button\n id={this.tooltipId}\n type=\"button\"\n onClick={this.handleClick}\n disabled={this.isDisabled()}\n class={{\n 'is-selected': this.isItem(this.item) && this.item.selected,\n }}\n >\n {this.renderIcon()}\n {this.renderLabel()}\n {this.renderTooltip()}\n </button>\n );\n }\n\n private readonly handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.select.emit(this.item);\n };\n\n private isItem(item: ActionBarItem | ListSeparator): item is ActionBarItem {\n return !('separator' in item);\n }\n\n private isDisabled() {\n if (this.isItem(this.item) && this.item.disabled) {\n return true;\n }\n\n if (!this.isVisible) {\n return true;\n }\n }\n\n private renderIcon() {\n if (this.isItem(this.item) && !this.item.icon) {\n return;\n }\n\n if ('icon' in this.item) {\n const name = getIconName(this.item.icon);\n\n const color = getIconColor(this.item.icon, this.item.iconColor);\n const title = getIconTitle(this.item.icon);\n\n return (\n <limel-icon\n name={name}\n aria-label={title}\n aria-hidden={title ? null : 'true'}\n style={{\n '--action-bar-item-icon-color': `${color}`,\n }}\n />\n );\n }\n }\n\n private renderLabel() {\n if (!this.isItem(this.item) || this.item.iconOnly) {\n return;\n }\n\n return <span class=\"text\">{this.item.text}</span>;\n }\n\n private renderTooltip() {\n if (!this.isItem(this.item)) {\n return;\n }\n\n return (\n <limel-tooltip\n elementId={this.tooltipId}\n label={this.getTooltipLabel(this.item)}\n helperLabel={this.item.commandText}\n />\n );\n }\n\n private getTooltipLabel(item: ActionBarItem): string {\n const iconTitle = getIconTitle(item.icon);\n const tooltipLabel = item.text;\n\n if (iconTitle && tooltipLabel) {\n return `${iconTitle} ${tooltipLabel}`;\n }\n\n return tooltipLabel;\n }\n\n private triggerIconColorWarning() {\n if (this.isItem(this.item) && this.item.iconColor) {\n console.warn(\n \"The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.\"\n );\n }\n }\n}\n","import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ActionBarItem } from '../../action-bar/action-bar.types';\nimport { ListSeparator } from '../../list-item/list-item.types';\nimport { MenuItem, OpenDirection } from '../../menu/menu.types';\nimport { LimelMenuCustomEvent } from '../../../components';\nimport { Icon } from '../../../global/shared-types/icon.types';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-action-bar-overflow-menu',\n shadow: false,\n})\nexport class ActionBarOverflowMenu {\n /**\n * List of the items that should be rendered in the overflow menu.\n */\n @Prop()\n public items: Array<MenuItem | ListSeparator>;\n\n /**\n * Defines the location that the content of the overflow menu\n * appears, in relation to its trigger.\n * It defaults to `bottom-end`, since in normal scenarios\n * (for example when the action bar is not floating at the bottom of the screen)\n * this menu is the right-most item in the user interface of the component.\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection = 'bottom-end';\n\n /**\n * Icon to display in the overflow menu trigger.\n * If not provided, the number of items in the overflow menu will be displayed.\n */\n @Prop()\n public overFlowIcon?: Icon;\n\n /**\n * Fired when an item in the action bar overflow menu has been clicked.\n * @public\n */\n @Event()\n public select: EventEmitter<ActionBarItem>;\n\n public render() {\n return (\n <Host>\n <limel-menu\n openDirection={this.openDirection}\n items={this.items}\n onSelect={this.handleSelect}\n >\n <button slot=\"trigger\">\n {this.getOverflowTriggerContent()}\n </button>\n </limel-menu>\n </Host>\n );\n }\n\n private getOverflowTriggerContent = () => {\n if (this.overFlowIcon) {\n const { color, name, title } = this.overFlowIcon;\n\n return (\n <limel-icon\n style={{\n color: color,\n }}\n name={name}\n aria-label={title}\n />\n );\n }\n\n return `+${this.numberOfMenuItems}`;\n };\n\n private handleSelect = (event: LimelMenuCustomEvent<MenuItem>) => {\n event.stopPropagation();\n this.select.emit(event.detail);\n };\n\n private get numberOfMenuItems() {\n return this.items.filter((item) => this.isMenuItem(item)).length;\n }\n\n private isMenuItem(item: MenuItem | ListSeparator): item is MenuItem {\n return !('separator' in item);\n }\n}\n"],"mappings":"iMAAA,MAAMA,EAAmB,kkG,MC6BZC,EAAe,MAmCxBC,YAAAC,G,yCAsCiBC,KAAAC,YAAeC,IAC5BA,EAAMC,kBACNH,KAAKI,OAAOC,KAAKL,KAAKM,KAAK,E,mCAxDH,K,cAMD,MAWvBN,KAAKO,UAAYC,G,CAGdC,oBACHC,EAAmBV,KAAKW,K,CAGrBC,mBACHZ,KAAKa,yB,CAGFC,uBACHC,EAAqBf,KAAKW,K,CAGvBK,SACH,IAAKhB,KAAKiB,OAAOjB,KAAKM,OAASN,KAAKM,KAAKY,UAAW,CAChD,OAAOC,EAAA,U,CAGX,OACIA,EAAA,UACIC,GAAIpB,KAAKO,UACTc,KAAK,SACLC,QAAStB,KAAKC,YACdsB,SAAUvB,KAAKwB,aACfC,MAAO,CACH,cAAezB,KAAKiB,OAAOjB,KAAKM,OAASN,KAAKM,KAAKoB,WAGtD1B,KAAK2B,aACL3B,KAAK4B,cACL5B,KAAK6B,gB,CAUVZ,OAAOX,GACX,QAAS,cAAeA,E,CAGpBkB,aACJ,GAAIxB,KAAKiB,OAAOjB,KAAKM,OAASN,KAAKM,KAAKiB,SAAU,CAC9C,OAAO,I,CAGX,IAAKvB,KAAK8B,UAAW,CACjB,OAAO,I,EAIPH,aACJ,GAAI3B,KAAKiB,OAAOjB,KAAKM,QAAUN,KAAKM,KAAKyB,KAAM,CAC3C,M,CAGJ,GAAI,SAAU/B,KAAKM,KAAM,CACrB,MAAM0B,EAAOC,EAAYjC,KAAKM,KAAKyB,MAEnC,MAAMG,EAAQC,EAAanC,KAAKM,KAAKyB,KAAM/B,KAAKM,KAAK8B,WACrD,MAAMC,EAAQC,EAAatC,KAAKM,KAAKyB,MAErC,OACIZ,EAAA,cACIa,KAAMA,EAAI,aACEK,EAAK,cACJA,EAAQ,KAAO,OAC5BE,MAAO,CACH,+BAAgC,GAAGL,M,EAO/CN,cACJ,IAAK5B,KAAKiB,OAAOjB,KAAKM,OAASN,KAAKM,KAAKkC,SAAU,CAC/C,M,CAGJ,OAAOrB,EAAA,QAAMM,MAAM,QAAQzB,KAAKM,KAAKmC,K,CAGjCZ,gBACJ,IAAK7B,KAAKiB,OAAOjB,KAAKM,MAAO,CACzB,M,CAGJ,OACIa,EAAA,iBACIuB,UAAW1C,KAAKO,UAChBoC,MAAO3C,KAAK4C,gBAAgB5C,KAAKM,MACjCuC,YAAa7C,KAAKM,KAAKwC,a,CAK3BF,gBAAgBtC,GACpB,MAAMyC,EAAYT,EAAahC,EAAKyB,MACpC,MAAMiB,EAAe1C,EAAKmC,KAE1B,GAAIM,GAAaC,EAAc,CAC3B,MAAO,GAAGD,KAAaC,G,CAG3B,OAAOA,C,CAGHnC,0BACJ,GAAIb,KAAKiB,OAAOjB,KAAKM,OAASN,KAAKM,KAAK8B,UAAW,CAC/Ca,QAAQC,KACJ,uK,8CCvKHC,EAAqB,M,wDA+CtBnD,KAAAoD,0BAA4B,KAChC,GAAIpD,KAAKqD,aAAc,CACnB,MAAMnB,MAAEA,EAAKF,KAAEA,EAAIK,MAAEA,GAAUrC,KAAKqD,aAEpC,OACIlC,EAAA,cACIoB,MAAO,CACHL,MAAOA,GAEXF,KAAMA,EAAI,aACEK,G,CAKxB,MAAO,IAAIrC,KAAKsD,mBAAmB,EAG/BtD,KAAAuD,aAAgBrD,IACpBA,EAAMC,kBACNH,KAAKI,OAAOC,KAAKH,EAAMsD,OAAO,E,wCApDI,a,4BAgB/BxC,SACH,OACIG,EAACsC,EAAI,KACDtC,EAAA,cACIuC,cAAe1D,KAAK0D,cACpBC,MAAO3D,KAAK2D,MACZC,SAAU5D,KAAKuD,cAEfpC,EAAA,UAAQ0C,KAAK,WACR7D,KAAKoD,8B,CA8BdE,wBACR,OAAOtD,KAAK2D,MAAMG,QAAQxD,GAASN,KAAK+D,WAAWzD,KAAO0D,M,CAGtDD,WAAWzD,GACf,QAAS,cAAeA,E"}
|
|
@@ -15,6 +15,7 @@ import { ActionBarItem } from '../action-bar/action-bar.types';
|
|
|
15
15
|
* @exampleComponent limel-example-card-orientation
|
|
16
16
|
* @exampleComponent limel-example-card-slot
|
|
17
17
|
* @exampleComponent limel-example-card-styling
|
|
18
|
+
* @exampleComponent limel-example-card-scrollable-shadow
|
|
18
19
|
*/
|
|
19
20
|
export declare class Card {
|
|
20
21
|
/**
|
|
@@ -60,10 +61,18 @@ export declare class Card {
|
|
|
60
61
|
* Fired when a action bar item has been clicked.
|
|
61
62
|
*/
|
|
62
63
|
actionSelected: EventEmitter<ActionBarItem>;
|
|
64
|
+
private canScrollUp;
|
|
65
|
+
private canScrollDown;
|
|
66
|
+
private markdownElement?;
|
|
63
67
|
private host;
|
|
64
68
|
private handleMouseEnter;
|
|
65
69
|
private handleMouseLeave;
|
|
70
|
+
private markdownResizeObserver?;
|
|
66
71
|
componentWillLoad(): void;
|
|
72
|
+
disconnectedCallback(): void;
|
|
73
|
+
componentDidLoad(): void;
|
|
74
|
+
private setMarkdownElement;
|
|
75
|
+
private checkIfScrollable;
|
|
67
76
|
render(): any;
|
|
68
77
|
private renderImage;
|
|
69
78
|
private renderHeader;
|
|
@@ -188,7 +188,7 @@ export declare class ChipSet {
|
|
|
188
188
|
componentDidLoad(): void;
|
|
189
189
|
componentDidUpdate(): void;
|
|
190
190
|
disconnectedCallback(): void;
|
|
191
|
-
render(): any
|
|
191
|
+
render(): any;
|
|
192
192
|
private getContentProps;
|
|
193
193
|
private renderContent;
|
|
194
194
|
private readonly getValue;
|
|
@@ -11,7 +11,7 @@ import { Link } from '../../global/shared-types/link.types';
|
|
|
11
11
|
export declare class HelpContent {
|
|
12
12
|
value: string;
|
|
13
13
|
readMoreLink?: Link;
|
|
14
|
-
render(): any
|
|
14
|
+
render(): any;
|
|
15
15
|
private renderReadMoreLink;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=help-content.d.ts.map
|
|
@@ -164,7 +164,7 @@ export declare class InputField {
|
|
|
164
164
|
componentDidLoad(): void;
|
|
165
165
|
disconnectedCallback(): void;
|
|
166
166
|
componentDidUpdate(): void;
|
|
167
|
-
render(): any
|
|
167
|
+
render(): any;
|
|
168
168
|
protected valueWatcher(newValue: string): void;
|
|
169
169
|
protected completionsWatcher(): void;
|
|
170
170
|
private initialize;
|
|
@@ -52,7 +52,7 @@ export declare class Markdown {
|
|
|
52
52
|
private imageIntersectionObserver;
|
|
53
53
|
componentDidLoad(): Promise<void>;
|
|
54
54
|
disconnectedCallback(): void;
|
|
55
|
-
render(): any
|
|
55
|
+
render(): any;
|
|
56
56
|
private setupImageIntersectionObserver;
|
|
57
57
|
private cleanupImageIntersectionObserver;
|
|
58
58
|
}
|
|
@@ -417,6 +417,7 @@ export namespace Components {
|
|
|
417
417
|
* @exampleComponent limel-example-card-orientation
|
|
418
418
|
* @exampleComponent limel-example-card-slot
|
|
419
419
|
* @exampleComponent limel-example-card-styling
|
|
420
|
+
* @exampleComponent limel-example-card-scrollable-shadow
|
|
420
421
|
*/
|
|
421
422
|
interface LimelCard {
|
|
422
423
|
/**
|
|
@@ -3839,6 +3840,7 @@ declare global {
|
|
|
3839
3840
|
* @exampleComponent limel-example-card-orientation
|
|
3840
3841
|
* @exampleComponent limel-example-card-slot
|
|
3841
3842
|
* @exampleComponent limel-example-card-styling
|
|
3843
|
+
* @exampleComponent limel-example-card-scrollable-shadow
|
|
3842
3844
|
*/
|
|
3843
3845
|
interface HTMLLimelCardElement extends Components.LimelCard, HTMLStencilElement {
|
|
3844
3846
|
}
|
|
@@ -5667,6 +5669,7 @@ declare namespace LocalJSX {
|
|
|
5667
5669
|
* @exampleComponent limel-example-card-orientation
|
|
5668
5670
|
* @exampleComponent limel-example-card-slot
|
|
5669
5671
|
* @exampleComponent limel-example-card-styling
|
|
5672
|
+
* @exampleComponent limel-example-card-scrollable-shadow
|
|
5670
5673
|
*/
|
|
5671
5674
|
interface LimelCard {
|
|
5672
5675
|
/**
|
|
@@ -9259,6 +9262,7 @@ declare module "@stencil/core" {
|
|
|
9259
9262
|
* @exampleComponent limel-example-card-orientation
|
|
9260
9263
|
* @exampleComponent limel-example-card-slot
|
|
9261
9264
|
* @exampleComponent limel-example-card-styling
|
|
9265
|
+
* @exampleComponent limel-example-card-scrollable-shadow
|
|
9262
9266
|
*/
|
|
9263
9267
|
"limel-card": LocalJSX.LimelCard & JSXBase.HTMLAttributes<HTMLLimelCardElement>;
|
|
9264
9268
|
/**
|
|
@@ -44,4 +44,5 @@ export * from './components/text-editor/text-editor.types';
|
|
|
44
44
|
export * from './components/text-editor/types';
|
|
45
45
|
export * from './components/text-editor/prosemirror-adapter/menu/types';
|
|
46
46
|
export * from './util/image-resize';
|
|
47
|
+
export { redrawComponents } from './util/dispatch-resize-event';
|
|
47
48
|
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1,2 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatches a resize event on the window.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
export declare const dispatchResizeEvent: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Triggers a redraw of lime-elements components.
|
|
9
|
+
*
|
|
10
|
+
* Some components (like `limel-slider`, `limel-select`, and others using
|
|
11
|
+
* Material Design Components internally) need to be visible during
|
|
12
|
+
* initialization to render correctly. If a component is created while
|
|
13
|
+
* hidden (e.g., inside a collapsed section or a closed dialog), it may
|
|
14
|
+
* render incorrectly when made visible.
|
|
15
|
+
*
|
|
16
|
+
* Call this function after programmatically showing previously hidden
|
|
17
|
+
* components to trigger their re-initialization.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { redrawComponents } from '@limetech/lime-elements';
|
|
22
|
+
*
|
|
23
|
+
* // After showing a previously hidden element, wait for DOM update
|
|
24
|
+
* this.showSlider = true;
|
|
25
|
+
* requestAnimationFrame(() => {
|
|
26
|
+
* redrawComponents();
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* This function works by dispatching a `resize` event on the window,
|
|
32
|
+
* which triggers the internal re-initialization logic in affected components.
|
|
33
|
+
* It's safe to call and has minimal performance impact.
|
|
34
|
+
*
|
|
35
|
+
* Note: This function is a no-op in non-browser environments (SSR/tests).
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const redrawComponents: () => void;
|
|
2
40
|
//# sourceMappingURL=dispatch-resize-event.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const dispatchResizeEvent = () => {
|
|
4
|
-
const resizeEvent = new UIEvent('resize', { view: window, detail: 0 });
|
|
5
|
-
window.dispatchEvent(resizeEvent);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
exports.dispatchResizeEvent = dispatchResizeEvent;
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=dispatch-resize-event-4462d78f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"dispatch-resize-event-4462d78f.js","mappings":";;MAAa,mBAAmB,GAAG;EAC/B,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;EACvE,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AACtC;;;;","names":[],"sources":["./src/util/dispatch-resize-event.ts"],"sourcesContent":["export const dispatchResizeEvent = () => {\n const resizeEvent = new UIEvent('resize', { view: window, detail: 0 });\n window.dispatchEvent(resizeEvent);\n};\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"dispatch-resize-event-cd1d230c.js","mappings":"MAAa,mBAAmB,GAAG;EAC/B,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;EACvE,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AACtC;;;;","names":[],"sources":["./src/util/dispatch-resize-event.ts"],"sourcesContent":["export const dispatchResizeEvent = () => {\n const resizeEvent = new UIEvent('resize', { view: window, detail: 0 });\n window.dispatchEvent(resizeEvent);\n};\n"],"version":3}
|