@limetech/lime-elements 37.55.3 → 37.55.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-callout.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +2 -2
  7. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -1
  8. package/dist/cjs/limel-form.cjs.entry.js +2 -2
  9. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +6 -6
  11. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  12. package/dist/cjs/limel-select.cjs.entry.js +5 -6
  13. package/dist/cjs/limel-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/limel-snackbar.cjs.entry.js +92 -523
  15. package/dist/cjs/limel-snackbar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/components/callout/callout.helpers.js +1 -1
  18. package/dist/collection/components/callout/callout.helpers.js.map +1 -1
  19. package/dist/collection/components/color-picker/color-picker.js +0 -1
  20. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  21. package/dist/collection/components/form/widgets/code-editor.js +2 -2
  22. package/dist/collection/components/form/widgets/code-editor.js.map +1 -1
  23. package/dist/collection/components/list/list-renderer.js +2 -2
  24. package/dist/collection/components/list/list-renderer.js.map +1 -1
  25. package/dist/collection/components/select/select.js +5 -6
  26. package/dist/collection/components/select/select.js.map +1 -1
  27. package/dist/collection/components/snackbar/container.js +50 -0
  28. package/dist/collection/components/snackbar/container.js.map +1 -0
  29. package/dist/collection/components/snackbar/snackbar.css +37 -51
  30. package/dist/collection/components/snackbar/snackbar.js +66 -40
  31. package/dist/collection/components/snackbar/snackbar.js.map +1 -1
  32. package/dist/collection/index.js.map +1 -1
  33. package/dist/esm/lime-elements.js +1 -1
  34. package/dist/esm/limel-callout.entry.js +1 -1
  35. package/dist/esm/limel-callout.entry.js.map +1 -1
  36. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  37. package/dist/esm/limel-dynamic-label_4.entry.js +2 -2
  38. package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -1
  39. package/dist/esm/limel-form.entry.js +2 -2
  40. package/dist/esm/limel-form.entry.js.map +1 -1
  41. package/dist/esm/limel-prosemirror-adapter.entry.js +6 -6
  42. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  43. package/dist/esm/limel-select.entry.js +5 -6
  44. package/dist/esm/limel-select.entry.js.map +1 -1
  45. package/dist/esm/limel-snackbar.entry.js +92 -523
  46. package/dist/esm/limel-snackbar.entry.js.map +1 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/lime-elements/lime-elements.esm.js +1 -1
  49. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  50. package/dist/lime-elements/p-47f7d74f.entry.js.map +1 -1
  51. package/dist/lime-elements/p-48652dbe.entry.js.map +1 -1
  52. package/dist/lime-elements/p-50303eb1.entry.js.map +1 -1
  53. package/dist/lime-elements/{p-ed214c35.entry.js → p-a82054c2.entry.js} +2 -2
  54. package/dist/lime-elements/p-a82054c2.entry.js.map +1 -0
  55. package/dist/lime-elements/p-c66da652.entry.js +2 -0
  56. package/dist/lime-elements/p-c66da652.entry.js.map +1 -0
  57. package/dist/lime-elements/p-e7fc1c16.entry.js +2 -0
  58. package/dist/lime-elements/p-e7fc1c16.entry.js.map +1 -0
  59. package/dist/lime-elements/{p-04357a88.entry.js → p-ef5539b0.entry.js} +4 -4
  60. package/dist/lime-elements/p-ef5539b0.entry.js.map +1 -0
  61. package/dist/types/components/list/list-renderer.d.ts +1 -1
  62. package/dist/types/components/snackbar/snackbar.d.ts +9 -7
  63. package/dist/types/components.d.ts +2 -4
  64. package/dist/types/index.d.ts +7 -0
  65. package/package.json +14 -11
  66. package/dist/lime-elements/p-04357a88.entry.js.map +0 -1
  67. package/dist/lime-elements/p-480884e6.entry.js +0 -90
  68. package/dist/lime-elements/p-480884e6.entry.js.map +0 -1
  69. package/dist/lime-elements/p-9a895330.entry.js +0 -2
  70. package/dist/lime-elements/p-9a895330.entry.js.map +0 -1
  71. package/dist/lime-elements/p-ed214c35.entry.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.55.3",
3
+ "version": "37.55.5",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,9 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@commitlint/config-conventional": "^19.2.2",
47
- "@microsoft/api-extractor": "^7.46.2",
47
+ "@eslint/eslintrc": "^3.1.0",
48
+ "@eslint/js": "^9.8.0",
49
+ "@microsoft/api-extractor": "^7.47.5",
48
50
  "@popperjs/core": "^2.11.8",
49
51
  "@rjsf/core": "^2.4.2",
50
52
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -57,20 +59,21 @@
57
59
  "@types/react": "^18.2.79",
58
60
  "@types/react-dom": "^18.2.25",
59
61
  "@types/tabulator-tables": "^4.9.4",
60
- "@typescript-eslint/eslint-plugin": "^7.7.1",
61
- "@typescript-eslint/parser": "^7.7.1",
62
+ "@typescript-eslint/eslint-plugin": "^8.0.1",
63
+ "@typescript-eslint/parser": "^8.0.1",
62
64
  "codemirror": "^5.65.9",
63
65
  "cross-env": "^7.0.3",
64
66
  "dayjs": "^1.11.11",
65
- "eslint": "^8.57.0",
67
+ "eslint": "^9.8.0",
66
68
  "eslint-config-prettier": "^9.1.0",
67
69
  "eslint-plugin-ban": "^1.6.0",
68
70
  "eslint-plugin-prefer-arrow": "^1.2.3",
69
- "eslint-plugin-prettier": "^5.1.3",
70
- "eslint-plugin-react": "^7.34.1",
71
- "eslint-plugin-sonarjs": "^0.25.1",
72
- "eslint-plugin-tsdoc": "^0.2.17",
71
+ "eslint-plugin-prettier": "^5.2.1",
72
+ "eslint-plugin-react": "^7.35.0",
73
+ "eslint-plugin-sonarjs": "^1.0.4",
74
+ "eslint-plugin-tsdoc": "^0.3.0",
73
75
  "flatpickr": "^4.6.13",
76
+ "globals": "^15.8.0",
74
77
  "html-escaper": "^3.0.3",
75
78
  "jest": "^27.5.1",
76
79
  "jest-cli": "^27.5.1",
@@ -82,10 +85,10 @@
82
85
  "moment": "^2.30.1",
83
86
  "number-abbreviate": "^2.0.0",
84
87
  "parse-css-color": "^0.2.1",
85
- "prettier": "^3.2.5",
88
+ "prettier": "^3.3.3",
86
89
  "prosemirror-example-setup": "^1.2.2",
87
90
  "prosemirror-markdown": "^1.12.0",
88
- "prosemirror-schema-basic": "^1.2.2",
91
+ "prosemirror-schema-basic": "^1.2.3",
89
92
  "puppeteer": "^19.11.1",
90
93
  "react": "^18.2.0",
91
94
  "react-dom": "^18.2.0",
@@ -1 +0,0 @@
1
- {"version":3,"names":["strings","ARIA_HIDDEN","ROLE","cssClasses","HELPER_TEXT_VALIDATION_MSG","HELPER_TEXT_VALIDATION_MSG_PERSISTENT","MDCSelectHelperTextFoundation","_super","__extends","adapter","call","this","__assign","defaultAdapter","Object","defineProperty","get","enumerable","configurable","addClass","undefined","removeClass","hasClass","setAttr","getAttr","removeAttr","setContent","prototype","getId","isVisible","content","setValidation","isValidation","setValidationMsgPersistent","isPersistent","setValidity","selectIsValid","isValidationMsg","isPersistentValidationMsg","msgShouldDisplay","showToScreenReader","hide","MDCFoundation","MDCSelectHelperText","apply","arguments","attachTo","root","foundation","getDefaultFoundation","_this","className","classList","add","remove","contains","attr","getAttribute","value","setAttribute","removeAttribute","textContent","MDCComponent","SelectTemplate","props","hasValue","hasEmptyText","isMultiple","length","text","isValid","invalid","checkValid","required","disabled","readonly","helperText","h","class","SelectValue","assign","HelperText","SelectDropdown","anchorClassList","isOpen","labelClassList","onClick","open","onKeyPress","onTriggerPress","id","label","getSelectedIcon","getSelectedText","ShowIcon","viewBox","focusable","stroke","points","name","size","trim","native","NativeDropdown","MenuDropdown","items","createMenuItems","options","containerId","visible","inheritParentWidth","containerStyle","dropdownZIndex","onDismiss","close","style","display","width","type","multiple","onChange","onMenuChange","filter","option","map","renderOption","onNativeChange","onFocus","onBlur","selectedOption","key","selected","isSelected","some","o","selectIsRequired","menuOptionFilter","getMenuOptionFilter","separator","secondaryText","getIconName","icon","color","getIconColor","iconColor","join","triggerIconColorWarning","forEach","console","warn","selectCss","Select","constructor","hostRef","hasChanged","handleMenuChange","bind","handleNativeChange","handleMenuTriggerKeyPress","openMenu","closeMenu","portalId","createRandomString","connectedCallback","initialize","componentWillLoad","isMobileDevice","host","hasAttribute","componentDidLoad","getOptionsExcludingSeparators","element","shadowRoot","querySelector","mdcFloatingLabel","MDCFloatingLabel","mdcSelectHelperText","disconnectedCallback","destroy","componentDidUpdate","menuOpen","setMenuFocus","render","getComputedStyle","getPropertyValue","watchOpen","newValue","oldValue","setTimeout","list","document","firstItem","_a","focus","setTriggerFocus","trigger","event","stopPropagation","selector","menuSurface","scrollPosition","scrollTop","detail","listItems","item","change","emit","requestAnimationFrame","listItem","emitFirstChangeEvent","isEnter","ENTER","keyCode","ENTER_KEY_CODE","isSpace","SPACE","SPACE_KEY_CODE","preventDefault","Array","optionElement","find"],"sources":["./node_modules/@material/select/helper-text/constants.js","./node_modules/@material/select/helper-text/foundation.js","./node_modules/@material/select/helper-text/component.js","./src/components/select/select.template.tsx","./src/components/select/select.scss?tag=limel-select&encapsulation=shadow","./src/components/select/select.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n ARIA_HIDDEN: 'aria-hidden',\n ROLE: 'role',\n};\nvar cssClasses = {\n HELPER_TEXT_VALIDATION_MSG: 'mdc-select-helper-text--validation-msg',\n HELPER_TEXT_VALIDATION_MSG_PERSISTENT: 'mdc-select-helper-text--validation-msg-persistent',\n};\nexport { strings, cssClasses };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, strings } from './constants';\nvar MDCSelectHelperTextFoundation = /** @class */ (function (_super) {\n __extends(MDCSelectHelperTextFoundation, _super);\n function MDCSelectHelperTextFoundation(adapter) {\n return _super.call(this, __assign(__assign({}, MDCSelectHelperTextFoundation.defaultAdapter), adapter)) || this;\n }\n Object.defineProperty(MDCSelectHelperTextFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSelectHelperTextFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSelectHelperTextFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCSelectHelperTextAdapter} for typing information on parameters and return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return false; },\n setAttr: function () { return undefined; },\n getAttr: function () { return null; },\n removeAttr: function () { return undefined; },\n setContent: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n /**\n * @return The ID of the helper text, or null if none is set.\n */\n MDCSelectHelperTextFoundation.prototype.getId = function () {\n return this.adapter.getAttr('id');\n };\n /**\n * @return Whether the helper text is currently visible.\n */\n MDCSelectHelperTextFoundation.prototype.isVisible = function () {\n return this.adapter.getAttr(strings.ARIA_HIDDEN) !== 'true';\n };\n /**\n * Sets the content of the helper text field.\n */\n MDCSelectHelperTextFoundation.prototype.setContent = function (content) {\n this.adapter.setContent(content);\n };\n /**\n * Sets the helper text to act as a validation message.\n * By default, validation messages are hidden when the select is valid and\n * visible when the select is invalid.\n *\n * @param isValidation True to make the helper text act as an error validation\n * message.\n */\n MDCSelectHelperTextFoundation.prototype.setValidation = function (isValidation) {\n if (isValidation) {\n this.adapter.addClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n }\n else {\n this.adapter.removeClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n }\n };\n /**\n * Sets the persistency of the validation helper text.\n * This keeps the validation message visible even if the select is valid,\n * though it will be displayed in the normal (grey) color.\n */\n MDCSelectHelperTextFoundation.prototype.setValidationMsgPersistent = function (isPersistent) {\n if (isPersistent) {\n this.adapter.addClass(cssClasses.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);\n }\n else {\n this.adapter.removeClass(cssClasses.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);\n }\n };\n /**\n * When acting as a validation message, shows/hides the helper text and\n * triggers alerts as necessary based on the select's validity.\n */\n MDCSelectHelperTextFoundation.prototype.setValidity = function (selectIsValid) {\n var isValidationMsg = this.adapter.hasClass(cssClasses.HELPER_TEXT_VALIDATION_MSG);\n if (!isValidationMsg) {\n // Non-validating helper-text is always displayed and does not participate\n // in validation logic.\n return;\n }\n var isPersistentValidationMsg = this.adapter.hasClass(cssClasses.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);\n // Validating helper text is displayed if select is invalid, unless it is\n // set as persistent, in which case it always displays.\n var msgShouldDisplay = !selectIsValid || isPersistentValidationMsg;\n if (msgShouldDisplay) {\n this.showToScreenReader();\n // In addition to displaying, also trigger an alert if the select\n // has become invalid.\n if (!selectIsValid) {\n this.adapter.setAttr(strings.ROLE, 'alert');\n }\n else {\n this.adapter.removeAttr(strings.ROLE);\n }\n return;\n }\n // Hide everything.\n this.adapter.removeAttr(strings.ROLE);\n this.hide();\n };\n /**\n * Makes the helper text visible to screen readers.\n */\n MDCSelectHelperTextFoundation.prototype.showToScreenReader = function () {\n this.adapter.removeAttr(strings.ARIA_HIDDEN);\n };\n /**\n * Hides the help text from screen readers.\n */\n MDCSelectHelperTextFoundation.prototype.hide = function () {\n this.adapter.setAttr(strings.ARIA_HIDDEN, 'true');\n };\n return MDCSelectHelperTextFoundation;\n}(MDCFoundation));\nexport { MDCSelectHelperTextFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCSelectHelperTextFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { MDCSelectHelperTextFoundation } from './foundation';\nvar MDCSelectHelperText = /** @class */ (function (_super) {\n __extends(MDCSelectHelperText, _super);\n function MDCSelectHelperText() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCSelectHelperText.attachTo = function (root) {\n return new MDCSelectHelperText(root);\n };\n Object.defineProperty(MDCSelectHelperText.prototype, \"foundationForSelect\", {\n // Provided for access by MDCSelect component\n get: function () {\n return this.foundation;\n },\n enumerable: false,\n configurable: true\n });\n MDCSelectHelperText.prototype.getDefaultFoundation = function () {\n var _this = this;\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n var adapter = {\n addClass: function (className) { return _this.root.classList.add(className); },\n removeClass: function (className) { return _this.root.classList.remove(className); },\n hasClass: function (className) { return _this.root.classList.contains(className); },\n getAttr: function (attr) { return _this.root.getAttribute(attr); },\n setAttr: function (attr, value) { return _this.root.setAttribute(attr, value); },\n removeAttr: function (attr) { return _this.root.removeAttribute(attr); },\n setContent: function (content) {\n _this.root.textContent = content;\n },\n };\n // tslint:enable:object-literal-sort-keys\n return new MDCSelectHelperTextFoundation(adapter);\n };\n return MDCSelectHelperText;\n}(MDCComponent));\nexport { MDCSelectHelperText };\n//# sourceMappingURL=component.js.map","import { ListItem, ListSeparator } from '../list/list-item.types';\nimport { Option } from '../select/option.types';\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { isMultiple } from '../../util/multiple';\nimport { getIconColor, getIconName } from '../icon/get-icon-props';\n\ninterface SelectTemplateProps {\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n invalid?: boolean;\n options: Array<Option | ListSeparator>;\n value: Option | Option[];\n label?: string;\n helperText?: string;\n multiple?: boolean;\n native: boolean;\n\n onNativeChange: (event: Event) => void;\n\n id: string;\n onMenuChange: (event: CustomEvent<ListItem | ListItem[]>) => void;\n onTriggerPress: (event: KeyboardEvent) => void;\n isOpen: boolean;\n open: () => void;\n close: () => void;\n checkValid: boolean;\n\n dropdownZIndex: string;\n}\n\nexport const SelectTemplate: FunctionalComponent<SelectTemplateProps> = (\n props,\n) => {\n const value = props.value;\n let hasValue = !!props.value;\n let hasEmptyText = true;\n if (isMultiple(value)) {\n hasValue = value.length > 0;\n } else if (hasValue) {\n hasValue = !!value.value;\n hasEmptyText = value.text === '';\n }\n\n let isValid = !props.invalid;\n if (props.checkValid && props.required && !hasValue) {\n isValid = false;\n }\n\n const classList = {\n 'limel-select': true,\n 'mdc-select': true,\n 'mdc-select--outlined': true,\n 'mdc-select--disabled': props.disabled,\n 'limel-select--readonly': props.readonly,\n 'limel-select--required': props.required,\n 'limel-select--invalid': !isValid,\n 'limel-select--empty': !hasValue,\n 'limel-select--with-helper-text': typeof props.helperText === 'string',\n };\n\n return (\n <div class={classList}>\n <SelectValue\n {...props}\n hasValue={hasValue}\n isValid={isValid}\n hasEmptyText={hasEmptyText}\n />\n <HelperText text={props.helperText} isValid={!props.invalid} />\n <SelectDropdown {...props} />\n </div>\n );\n};\n\nconst SelectValue: FunctionalComponent<\n SelectTemplateProps & {\n hasValue: boolean;\n isValid: boolean;\n hasEmptyText: boolean;\n }\n> = (props) => {\n const anchorClassList = {\n 'mdc-select__anchor': true,\n 'limel-select-trigger': true,\n 'limel-select--focused': props.isOpen,\n };\n const labelClassList = {\n 'mdc-floating-label': true,\n 'mdc-floating-label--float-above':\n !props.hasEmptyText ||\n props.isOpen ||\n props.readonly ||\n props.hasValue,\n 'mdc-floating-label--active': props.isOpen,\n };\n\n return (\n <button\n class={anchorClassList}\n onClick={props.open}\n onKeyPress={props.onTriggerPress}\n aria-haspopup=\"listbox\"\n aria-expanded={props.isOpen}\n aria-controls={props.id}\n aria-labelledby=\"s-label s-selected-text\"\n aria-required={props.required}\n disabled={props.disabled || props.readonly}\n >\n <span id=\"s-label\" class={labelClassList}>\n {props.label}\n </span>\n <span class=\"mdc-select__selected-text-container limel-select__selected-option\">\n {getSelectedIcon(props.value)}\n <span\n id=\"s-selected-text\"\n class=\"mdc-select__selected-text limel-select__selected-option__text\"\n >\n {getSelectedText(props.value, props.readonly)}\n </span>\n </span>\n <ShowIcon {...props} isValid={props.isValid} />\n <span class=\"mdc-select__dropdown-icon\">\n <svg\n class=\"mdc-select__dropdown-icon-graphic\"\n viewBox=\"7 10 10 5\"\n focusable=\"false\"\n >\n <polygon\n stroke=\"none\"\n fill-rule=\"evenodd\"\n points=\"7 10 12 15 17 10\"\n ></polygon>\n </svg>\n </span>\n </button>\n );\n};\n\nconst ShowIcon: FunctionalComponent<\n SelectTemplateProps & {\n isValid: boolean;\n }\n> = (props) => {\n if (props.isValid) {\n return;\n }\n\n return (\n <limel-icon name=\"high_importance\" size=\"medium\" class=\"invalid-icon\" />\n );\n};\n\nconst HelperText: FunctionalComponent<{ text: string; isValid: boolean }> = (\n props,\n) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return (\n <limel-helper-line\n helperText={props.text.trim()}\n invalid={!props.isValid}\n />\n );\n};\n\nconst SelectDropdown: FunctionalComponent<SelectTemplateProps> = (props) => {\n if (props.native) {\n return <NativeDropdown {...props} />;\n }\n\n return <MenuDropdown {...props} />;\n};\n\nconst MenuDropdown: FunctionalComponent<SelectTemplateProps> = (props) => {\n const items = createMenuItems(props.options, props.value, props.required);\n\n return (\n <limel-portal\n containerId={props.id}\n visible={props.isOpen}\n inheritParentWidth={true}\n containerStyle={{ 'z-index': props.dropdownZIndex }}\n >\n <limel-menu-surface\n open={props.isOpen}\n onDismiss={props.close}\n style={{\n '--mdc-menu-min-width': '100%',\n 'max-height': 'inherit',\n display: 'flex',\n 'min-width': '100%',\n width: 'fit-content',\n }}\n >\n <limel-list\n items={items}\n type={props.multiple ? 'checkbox' : 'selectable'}\n onChange={props.onMenuChange}\n />\n </limel-menu-surface>\n </limel-portal>\n );\n};\n\nconst NativeDropdown: FunctionalComponent<SelectTemplateProps> = (props) => {\n const options = props.options\n .filter((option): option is Option => !('separator' in option))\n .map(renderOption(props.value));\n\n return (\n <select\n required={props.required}\n aria-disabled={props.disabled}\n aria-required={props.required}\n onChange={props.onNativeChange}\n onFocus={props.open}\n onBlur={props.close}\n class=\"limel-select__native-control\"\n disabled={props.disabled}\n multiple={props.multiple}\n >\n {options}\n </select>\n );\n};\n\nconst renderOption = (selectedOption: Option | Option[]) => {\n return (option: Option) => {\n const { value, disabled, text } = option;\n\n return (\n <option\n key={value}\n value={value}\n selected={isSelected(option, selectedOption)}\n disabled={disabled}\n >\n {text}\n </option>\n );\n };\n};\n\nfunction isSelected(option: Option, value: Option | Option[]): boolean {\n if (!value) {\n return false;\n }\n\n if (isMultiple(value)) {\n return value.some((o) => option.value === o.value);\n }\n\n return option.value === value.value;\n}\n\nfunction createMenuItems(\n options: Array<Option | ListSeparator>,\n value: Option | Option[],\n selectIsRequired = false,\n): Array<ListItem<Option> | ListSeparator> {\n const menuOptionFilter = getMenuOptionFilter(selectIsRequired);\n\n return options.filter(menuOptionFilter).map((option) => {\n if ('separator' in option) {\n return {\n text: option.text,\n separator: true,\n };\n }\n\n const selected = isSelected(option, value);\n const { text, secondaryText, disabled } = option;\n const name = getIconName(option.icon);\n const color = getIconColor(option.icon, option.iconColor);\n\n if (!name) {\n return {\n text: text,\n secondaryText: secondaryText,\n selected: selected,\n disabled: disabled,\n value: option,\n };\n }\n\n return {\n text: text,\n secondaryText: secondaryText,\n selected: selected,\n disabled: disabled,\n value: option,\n icon: {\n name: name,\n color: color,\n },\n };\n });\n}\n\nfunction getMenuOptionFilter(selectIsRequired: boolean) {\n return (option: Option | ListSeparator) => {\n if (!selectIsRequired) {\n // If the select component is NOT required, we keep all options.\n return true;\n }\n\n if (option.text) {\n // If the select component IS required, we keep only options\n // that are not \"empty\". We only check the text property, because\n // some systems use an \"empty option\" that will have a value for\n // the `value` property, to signify \"no option selected\". Such\n // an option should be treated as \"empty\".\n return true;\n }\n\n if ('separator' in option) {\n return true;\n }\n };\n}\n\nfunction getSelectedText(value: Option | Option[], readonly: boolean): string {\n if ((!value || (isMultiple(value) && !value.length)) && readonly) {\n return '–';\n }\n\n if (!value) {\n return '';\n }\n\n if (isMultiple(value)) {\n return value.map((option) => option.text).join(', ');\n }\n\n return value.text;\n}\n\nfunction getSelectedIcon(value: any) {\n if (!value || !value.icon) {\n return '';\n }\n\n const name = getIconName(value.icon);\n const color = getIconColor(value.icon, value.iconColor);\n const style: any = {};\n if (color) {\n style.color = color;\n }\n\n return (\n <limel-icon\n class=\"limel-select__selected-option__icon\"\n name={name}\n size=\"medium\"\n style={style}\n />\n );\n}\n\nexport function triggerIconColorWarning(options: Option[]) {\n options.forEach((option) => {\n if (option.iconColor) {\n /* eslint-disable-next-line no-console */\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","@use '../../style/functions';\n@use '../../style/internal/shared_input-select-picker';\n@use '../../style/mixins';\n\n@use '@material/select/styles';\n@use '@material/floating-label';\n@use '@material/floating-label/mdc-floating-label';\n\n// Note! The `--dropdown-z-index` property is used from `select.tsx`.\n/**\n * @prop --dropdown-z-index: z-index of the dropdown menu.\n */\n\n:host {\n display: block;\n position: relative;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.mdc-select--outlined .mdc-floating-label {\n left: functions.pxToRem(16);\n}\n\n.mdc-select__anchor,\n.mdc-floating-label,\n.mdc-select__selected-text {\n // As long as this component is depended on MDC,\n // we need to force it to be font-agnostic.\n // When MDC-dependency is removed, this block can also be removed.\n // However, on removal of MDC-dependency, we should also make sure to check\n // other font-related styles that might be set by MDC,\n // such as `letter-spacing` or `font-size`.\n font-family: inherit;\n}\n\n.mdc-select__dropdown-icon-graphic {\n transition: transform 0.2s ease;\n}\n\n.limel-select__selected-option {\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n outline: none;\n\n align-self: center;\n min-width: 0; // makes it truncate and prevents the select to grow wider than its container\n padding: 0 0.25rem 0 1rem;\n}\n\n.limel-select__selected-option__icon {\n margin-right: functions.pxToRem(8);\n margin-left: functions.pxToRem(-8);\n flex-shrink: 0;\n}\n\n.limel-select__selected-option__text {\n .mdc-select:not(.mdc-select--disabled) & {\n @include shared_input-select-picker.looks-like-input-label;\n }\n @include mixins.truncate-text;\n}\n\n.limel-select {\n flex-wrap: wrap;\n width: 100%;\n\n &:not(.limel-select--readonly) {\n .limel-select-trigger {\n background-color: shared_input-select-picker.$background-color-focused;\n }\n }\n\n .mdc-select__anchor {\n height: functions.pxToRem(36);\n padding-left: functions.pxToRem(0);\n }\n .limel-select-trigger {\n border: none;\n height: shared_input-select-picker.$height-of-mdc-text-field;\n display: inline-flex;\n align-items: center;\n\n border-radius: functions.pxToRem(5);\n\n .mdc-floating-label {\n color: shared_input-select-picker.$label-color;\n width: calc(\n 100% - #{functions.pxToRem(16)}\n ); //This forces the label to truncate when container is too little.\n &.mdc-floating-label--float-above {\n font-size: shared_input-select-picker.$cropped-label-hack--font-size;\n transform: translateY(functions.pxToRem(-27)) scale(0.75);\n }\n }\n }\n\n .limel-select-trigger,\n .limel-select__selected-option {\n width: 100%;\n }\n\n .mdc-select__dropdown-icon {\n margin-right: 0.25rem;\n margin-left: 0.25rem;\n }\n\n &.mdc-select--disabled {\n .limel-select-trigger {\n @include shared_input-select-picker.looks-disabled;\n box-shadow: var(--button-shadow-normal);\n }\n .mdc-select__dropdown-icon {\n svg {\n fill: rgb(var(--contrast-800));\n }\n }\n }\n\n &:not(.mdc-select--disabled) {\n .mdc-select__dropdown-icon {\n svg {\n fill: rgb(var(--contrast-1000));\n }\n }\n\n .limel-select-trigger {\n @include mixins.is-elevated-clickable;\n @include mixins.visualize-keyboard-focus;\n\n &.limel-select--focused {\n background-color: shared_input-select-picker.$background-color-focused;\n\n .mdc-floating-label {\n color: var(--mdc-theme-primary);\n }\n\n .mdc-select__dropdown-icon {\n svg {\n fill: var(--mdc-theme-primary);\n }\n }\n\n .mdc-select__dropdown-icon-graphic {\n transform: rotate(-180deg);\n }\n }\n\n &[aria-expanded]:not([aria-expanded='false']),\n &[aria-expanded='true'] {\n box-shadow: var(--button-shadow-inset-pressed);\n }\n }\n }\n\n &.limel-select--required {\n .mdc-floating-label::after {\n content: '*';\n }\n }\n\n &.limel-select--invalid {\n .limel-select__selected-option__text,\n .invalid-icon {\n color: var(--lime-error-text-color);\n }\n .mdc-floating-label:not(.mdc-floating-label--float-above) {\n max-width: calc(\n 100% - #{functions.pxToRem(64)}\n ); // leaves space for the invalid-icon\n }\n }\n}\n\n.invalid-icon {\n flex-shrink: 0;\n}\n\nselect.limel-select__native-control {\n position: absolute;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n opacity: 0;\n border: 0;\n}\n\n@import './partial-styles/_readonly';\n@import './partial-styles/_helper-text';\n","import { ListItem, ListSeparator } from '../list/list-item.types';\nimport { Option } from '../select/option.types';\nimport { MDCFloatingLabel } from '@material/floating-label';\nimport { MDCSelectHelperText } from '@material/select/helper-text';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { isMobileDevice } from '../../util/device';\nimport {\n ENTER,\n ENTER_KEY_CODE,\n SPACE,\n SPACE_KEY_CODE,\n} from '../../util/keycodes';\nimport { isMultiple } from '../../util/multiple';\nimport { createRandomString } from '../../util/random-string';\nimport { SelectTemplate, triggerIconColorWarning } from './select.template';\n\n/**\n * @exampleComponent limel-example-select\n * @exampleComponent limel-example-select-with-icons\n * @exampleComponent limel-example-select-with-separators\n * @exampleComponent limel-example-select-with-secondary-text\n * @exampleComponent limel-example-select-multiple\n * @exampleComponent limel-example-select-with-empty-option\n * @exampleComponent limel-example-select-preselected\n * @exampleComponent limel-example-select-change-options\n * @exampleComponent limel-example-select-dialog\n */\n@Component({\n tag: 'limel-select',\n shadow: true,\n styleUrl: 'select.scss',\n})\nexport class Select {\n /**\n * Set to `true` to make the field disabled.\n * and visually shows that the `select` component is editable but disabled.\n * This tells the users that if certain requirements are met,\n * the component may become interactable.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Set to `true` to make the field read-only.\n * This visualizes the component slightly differently.\n * But shows no visual sign indicating that the component is disabled\n * or can ever become interactable.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * Set to `true` to indicate that the current value of the select is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid: boolean;\n\n /**\n * True if the control requires a value.\n */\n @Prop({ reflect: true })\n public required = false;\n\n /**\n * Text to display next to the select.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Optional helper text to display below the input field when it has focus.\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Currently selected value or values.\n * If `multiple` is `true`, this must be an array. Otherwise it must be a\n * single value.\n */\n @Prop()\n public value: Option | Option[];\n\n /**\n * List of options.\n */\n @Prop()\n public options: Array<Option | ListSeparator> = [];\n\n /**\n * Set to `true` to allow multiple values to be selected.\n */\n @Prop()\n public multiple: boolean = false;\n\n /**\n * Emitted when the value is changed.\n */\n @Event()\n private change: EventEmitter<Option | Option[]>;\n\n @Element()\n private host: HTMLLimelSelectElement;\n\n @State()\n private menuOpen: boolean = false;\n\n private hasChanged: boolean = false;\n private checkValid: boolean = false;\n private mdcSelectHelperText: MDCSelectHelperText;\n private mdcFloatingLabel: MDCFloatingLabel;\n private isMobileDevice: boolean;\n private portalId: string;\n\n constructor() {\n this.handleMenuChange = this.handleMenuChange.bind(this);\n this.handleNativeChange = this.handleNativeChange.bind(this);\n this.handleMenuTriggerKeyPress =\n this.handleMenuTriggerKeyPress.bind(this);\n this.openMenu = this.openMenu.bind(this);\n this.closeMenu = this.closeMenu.bind(this);\n\n this.portalId = createRandomString();\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n this.isMobileDevice = isMobileDevice();\n\n // It should not be possible to render the native select for consumers, but we still want to make it testable.\n // We can set this attribute in tests to force rendering of the native select\n if (this.host.hasAttribute('data-native')) {\n this.isMobileDevice = true;\n }\n }\n\n public componentDidLoad() {\n this.initialize();\n triggerIconColorWarning(this.getOptionsExcludingSeparators());\n }\n\n private initialize() {\n let element: HTMLElement;\n element = this.host.shadowRoot.querySelector('.mdc-floating-label');\n if (!element) {\n return;\n }\n\n this.mdcFloatingLabel = new MDCFloatingLabel(element);\n\n element = this.host.shadowRoot.querySelector('.mdc-select-helper-text');\n if (element) {\n this.mdcSelectHelperText = new MDCSelectHelperText(element);\n }\n }\n\n public disconnectedCallback() {\n if (this.mdcFloatingLabel) {\n this.mdcFloatingLabel.destroy();\n }\n\n if (this.mdcSelectHelperText) {\n this.mdcSelectHelperText.destroy();\n }\n }\n\n public componentDidUpdate() {\n if (this.menuOpen) {\n this.setMenuFocus();\n }\n }\n\n public render() {\n const dropdownZIndex = getComputedStyle(this.host).getPropertyValue(\n '--dropdown-z-index',\n );\n\n return (\n <SelectTemplate\n id={this.portalId}\n disabled={this.disabled || this.readonly}\n readonly={this.readonly}\n required={this.required}\n invalid={this.invalid}\n label={this.label}\n helperText={this.helperText}\n value={this.value}\n options={this.options}\n onMenuChange={this.handleMenuChange}\n onNativeChange={this.handleNativeChange}\n onTriggerPress={this.handleMenuTriggerKeyPress}\n multiple={this.multiple}\n isOpen={this.menuOpen}\n open={this.openMenu}\n close={this.closeMenu}\n checkValid={this.checkValid}\n native={this.isMobileDevice}\n dropdownZIndex={dropdownZIndex}\n />\n );\n }\n\n @Watch('menuOpen')\n protected watchOpen(newValue: boolean, oldValue: boolean) {\n if (this.checkValid) {\n return;\n }\n\n // Menu was closed for the first time\n if (!newValue && oldValue) {\n this.checkValid = true;\n }\n }\n\n private setMenuFocus() {\n if (this.isMobileDevice) {\n return;\n }\n\n setTimeout(() => {\n const list: HTMLElement = document.querySelector(\n `#${this.portalId} limel-menu-surface limel-list`,\n );\n const firstItem: HTMLElement =\n list?.shadowRoot?.querySelector('[tabindex]');\n\n if (firstItem) {\n firstItem.focus();\n }\n });\n }\n\n private setTriggerFocus() {\n const trigger: HTMLElement = this.host.shadowRoot.querySelector(\n '.limel-select-trigger',\n );\n trigger.focus();\n }\n\n private handleMenuChange(\n event: CustomEvent<Array<ListItem<Option>> | ListItem<Option>>,\n ) {\n event.stopPropagation();\n\n const selector = `#${this.portalId} .mdc-menu-surface`;\n const menuSurface: HTMLElement = document.querySelector(selector);\n\n if (!menuSurface) {\n return;\n }\n\n const scrollPosition = menuSurface.scrollTop;\n\n if (isMultiple(event.detail)) {\n const listItems: ListItem[] = event.detail;\n const options: Option[] = listItems.map((item) => item.value);\n this.change.emit(options);\n\n // Using a single requestAnimationFrame or setTimeout doesn't\n // work. Using two nested `requestAnimationFrame` worked most of\n // the time, but not always. Using `setTimeout` inside the\n // `requestAnimationFrame` seems to work consistently. /Ads\n requestAnimationFrame(() => {\n setTimeout(() => {\n menuSurface.scrollTop = scrollPosition;\n });\n });\n\n return;\n }\n\n if (!event.detail.selected) {\n return;\n }\n\n const listItem: ListItem = event.detail;\n const option: Option = listItem.value;\n if (option.disabled) {\n return;\n }\n\n this.change.emit(option);\n this.menuOpen = false;\n this.setTriggerFocus();\n }\n\n private openMenu() {\n if (this.emitFirstChangeEvent()) {\n this.hasChanged = true;\n this.change.emit(this.getOptionsExcludingSeparators()[0]);\n }\n\n this.menuOpen = true;\n }\n\n private emitFirstChangeEvent() {\n return !this.hasChanged && this.isMobileDevice && !this.value;\n }\n\n private closeMenu() {\n this.menuOpen = false;\n this.setTriggerFocus();\n }\n\n private handleMenuTriggerKeyPress(event: KeyboardEvent) {\n const isEnter = event.key === ENTER || event.keyCode === ENTER_KEY_CODE;\n const isSpace = event.key === SPACE || event.keyCode === SPACE_KEY_CODE;\n\n if (!this.menuOpen && (isSpace || isEnter)) {\n event.stopPropagation();\n event.preventDefault();\n this.menuOpen = true;\n }\n }\n\n private handleNativeChange(event: Event) {\n event.stopPropagation();\n\n const element: HTMLSelectElement = this.host.shadowRoot.querySelector(\n 'select.limel-select__native-control',\n );\n const options = Array.apply(null, element.options) // eslint-disable-line prefer-spread\n .filter((optionElement: HTMLOptionElement) => {\n return !!optionElement.selected;\n })\n .map((optionElement: HTMLOptionElement) => {\n return this.getOptionsExcludingSeparators().find(\n (o) => o.value === optionElement.value,\n );\n });\n\n if (this.multiple) {\n this.change.emit(options);\n\n return;\n }\n\n this.change.emit(options[0]);\n this.menuOpen = false;\n }\n\n private getOptionsExcludingSeparators(): Option[] {\n return this.options.filter(\n (option): option is Option => !('separator' in option),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAsBA,IAAIA,EAAU,CACVC,YAAa,cACbC,KAAM,QAEV,IAAIC,EAAa,CACbC,2BAA4B,yCAC5BC,sCAAuC;;;;;;;;;;;;;;;;;;;;;;GCH3C,IAAIC,EAA+C,SAAUC,GACzDC,EAAUF,EAA+BC,GACzC,SAASD,EAA8BG,GACnC,OAAOF,EAAOG,KAAKC,KAAMC,EAASA,EAAS,GAAIN,EAA8BO,gBAAiBJ,KAAaE,IACnH,CACIG,OAAOC,eAAeT,EAA+B,aAAc,CAC/DU,IAAK,WACD,OAAOb,CACnB,EACQc,WAAY,MACZC,aAAc,OAElBJ,OAAOC,eAAeT,EAA+B,UAAW,CAC5DU,IAAK,WACD,OAAOhB,CACnB,EACQiB,WAAY,MACZC,aAAc,OAElBJ,OAAOC,eAAeT,EAA+B,iBAAkB,CAInEU,IAAK,WAED,MAAO,CACHG,SAAU,WAAc,OAAOC,SAAU,EACzCC,YAAa,WAAc,OAAOD,SAAU,EAC5CE,SAAU,WAAc,OAAO,KAAM,EACrCC,QAAS,WAAc,OAAOH,SAAU,EACxCI,QAAS,WAAc,OAAO,IAAK,EACnCC,WAAY,WAAc,OAAOL,SAAU,EAC3CM,WAAY,WAAc,OAAON,SAAU,EAG3D,EACQH,WAAY,MACZC,aAAc,OAKlBZ,EAA8BqB,UAAUC,MAAQ,WAC5C,OAAOjB,KAAKF,QAAQe,QAAQ,KACpC,EAIIlB,EAA8BqB,UAAUE,UAAY,WAChD,OAAOlB,KAAKF,QAAQe,QAAQxB,EAAQC,eAAiB,MAC7D,EAIIK,EAA8BqB,UAAUD,WAAa,SAAUI,GAC3DnB,KAAKF,QAAQiB,WAAWI,EAChC,EASIxB,EAA8BqB,UAAUI,cAAgB,SAAUC,GAC9D,GAAIA,EAAc,CACdr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,cACpD,uCAEJ,MAAMlE,EAAU+G,MAAM9K,MAAM,KAAM+H,EAAQhE,SACrCe,QAAQiG,KACIA,EAAcxF,WAE1BP,KAAK+F,GACKhN,KAAK+J,gCAAgCkD,MACvCtF,GAAMA,EAAE5E,QAAUiK,EAAcjK,UAI7C,GAAI/C,KAAK4G,SAAU,CACf5G,KAAKkM,OAAOC,KAAKnG,GAEjB,M,CAGJhG,KAAKkM,OAAOC,KAAKnG,EAAQ,IACzBhG,KAAKyK,SAAW,K,CAGZV,gCACJ,OAAO/J,KAAKgG,QAAQe,QACfC,KAA+B,cAAeA,I"}
@@ -1,90 +0,0 @@
1
- import{r as t,c as i,h as n,g as s}from"./p-443111b3.js";import{t as e}from"./p-1b6c1122.js";import{_ as r,a,M as c,b as o}from"./p-2ff3f85e.js";import{c as u}from"./p-dcc97cc2.js";
2
- /**
3
- * @license
4
- * Copyright 2018 Google Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in
14
- * all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- * THE SOFTWARE.
23
- */var f={CLOSING:"mdc-snackbar--closing",OPEN:"mdc-snackbar--open",OPENING:"mdc-snackbar--opening"};var l={ACTION_SELECTOR:".mdc-snackbar__action",ARIA_LIVE_LABEL_TEXT_ATTR:"data-mdc-snackbar-label-text",CLOSED_EVENT:"MDCSnackbar:closed",CLOSING_EVENT:"MDCSnackbar:closing",DISMISS_SELECTOR:".mdc-snackbar__dismiss",LABEL_SELECTOR:".mdc-snackbar__label",OPENED_EVENT:"MDCSnackbar:opened",OPENING_EVENT:"MDCSnackbar:opening",REASON_ACTION:"action",REASON_DISMISS:"dismiss",SURFACE_SELECTOR:".mdc-snackbar__surface"};var h={DEFAULT_AUTO_DISMISS_TIMEOUT_MS:5e3,INDETERMINATE:-1,MAX_AUTO_DISMISS_TIMEOUT_MS:1e4,MIN_AUTO_DISMISS_TIMEOUT_MS:4e3,SNACKBAR_ANIMATION_CLOSE_TIME_MS:75,SNACKBAR_ANIMATION_OPEN_TIME_MS:150,ARIA_LIVE_DELAY_MS:1e3};
24
- /**
25
- * @license
26
- * Copyright 2018 Google Inc.
27
- *
28
- * Permission is hereby granted, free of charge, to any person obtaining a copy
29
- * of this software and associated documentation files (the "Software"), to deal
30
- * in the Software without restriction, including without limitation the rights
31
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
- * copies of the Software, and to permit persons to whom the Software is
33
- * furnished to do so, subject to the following conditions:
34
- *
35
- * The above copyright notice and this permission notice shall be included in
36
- * all copies or substantial portions of the Software.
37
- *
38
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
- * THE SOFTWARE.
45
- */var d=h.ARIA_LIVE_DELAY_MS;var m=l.ARIA_LIVE_LABEL_TEXT_ATTR;function b(t,i){if(i===void 0){i=t}var n=t.getAttribute("aria-live");var s=i.textContent.trim();if(!s||!n){return}t.setAttribute("aria-live","off");i.textContent="";i.innerHTML='<span style="display: inline-block; width: 0; height: 1px;">&nbsp;</span>';i.setAttribute(m,s);setTimeout((function(){t.setAttribute("aria-live",n);i.removeAttribute(m);i.textContent=s}),d)}
46
- /**
47
- * @license
48
- * Copyright 2018 Google Inc.
49
- *
50
- * Permission is hereby granted, free of charge, to any person obtaining a copy
51
- * of this software and associated documentation files (the "Software"), to deal
52
- * in the Software without restriction, including without limitation the rights
53
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
- * copies of the Software, and to permit persons to whom the Software is
55
- * furnished to do so, subject to the following conditions:
56
- *
57
- * The above copyright notice and this permission notice shall be included in
58
- * all copies or substantial portions of the Software.
59
- *
60
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
- * THE SOFTWARE.
67
- */var _=f.OPENING,g=f.OPEN,k=f.CLOSING;var v=l.REASON_ACTION,p=l.REASON_DISMISS;var E=function(t){r(i,t);function i(n){var s=t.call(this,a(a({},i.defaultAdapter),n))||this;s.opened=false;s.animationFrame=0;s.animationTimer=0;s.autoDismissTimer=0;s.autoDismissTimeoutMs=h.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;s.closeOnEscape=true;return s}Object.defineProperty(i,"cssClasses",{get:function(){return f},enumerable:false,configurable:true});Object.defineProperty(i,"strings",{get:function(){return l},enumerable:false,configurable:true});Object.defineProperty(i,"numbers",{get:function(){return h},enumerable:false,configurable:true});Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},announce:function(){return undefined},notifyClosed:function(){return undefined},notifyClosing:function(){return undefined},notifyOpened:function(){return undefined},notifyOpening:function(){return undefined},removeClass:function(){return undefined}}},enumerable:false,configurable:true});i.prototype.destroy=function(){this.clearAutoDismissTimer();cancelAnimationFrame(this.animationFrame);this.animationFrame=0;clearTimeout(this.animationTimer);this.animationTimer=0;this.adapter.removeClass(_);this.adapter.removeClass(g);this.adapter.removeClass(k)};i.prototype.open=function(){var t=this;this.clearAutoDismissTimer();this.opened=true;this.adapter.notifyOpening();this.adapter.removeClass(k);this.adapter.addClass(_);this.adapter.announce();this.runNextAnimationFrame((function(){t.adapter.addClass(g);t.animationTimer=setTimeout((function(){var i=t.getTimeoutMs();t.handleAnimationTimerEnd();t.adapter.notifyOpened();if(i!==h.INDETERMINATE){t.autoDismissTimer=setTimeout((function(){t.close(p)}),i)}}),h.SNACKBAR_ANIMATION_OPEN_TIME_MS)}))};i.prototype.close=function(t){var i=this;if(t===void 0){t=""}if(!this.opened){return}cancelAnimationFrame(this.animationFrame);this.animationFrame=0;this.clearAutoDismissTimer();this.opened=false;this.adapter.notifyClosing(t);this.adapter.addClass(f.CLOSING);this.adapter.removeClass(f.OPEN);this.adapter.removeClass(f.OPENING);clearTimeout(this.animationTimer);this.animationTimer=setTimeout((function(){i.handleAnimationTimerEnd();i.adapter.notifyClosed(t)}),h.SNACKBAR_ANIMATION_CLOSE_TIME_MS)};i.prototype.isOpen=function(){return this.opened};i.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs};i.prototype.setTimeoutMs=function(t){var i=h.MIN_AUTO_DISMISS_TIMEOUT_MS;var n=h.MAX_AUTO_DISMISS_TIMEOUT_MS;var s=h.INDETERMINATE;if(t===h.INDETERMINATE||t<=n&&t>=i){this.autoDismissTimeoutMs=t}else{throw new Error("\n timeoutMs must be an integer in the range "+i+"–"+n+"\n (or "+s+" to disable), but got '"+t+"'")}};i.prototype.getCloseOnEscape=function(){return this.closeOnEscape};i.prototype.setCloseOnEscape=function(t){this.closeOnEscape=t};i.prototype.handleKeyDown=function(t){var i=t.key==="Escape"||t.keyCode===27;if(i&&this.getCloseOnEscape()){this.close(p)}};i.prototype.handleActionButtonClick=function(t){this.close(v)};i.prototype.handleActionIconClick=function(t){this.close(p)};i.prototype.clearAutoDismissTimer=function(){clearTimeout(this.autoDismissTimer);this.autoDismissTimer=0};i.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0;this.adapter.removeClass(f.OPENING);this.adapter.removeClass(f.CLOSING)};i.prototype.runNextAnimationFrame=function(t){var i=this;cancelAnimationFrame(this.animationFrame);this.animationFrame=requestAnimationFrame((function(){i.animationFrame=0;clearTimeout(i.animationTimer);i.animationTimer=setTimeout(t,0)}))};return i}(c);
68
- /**
69
- * @license
70
- * Copyright 2018 Google Inc.
71
- *
72
- * Permission is hereby granted, free of charge, to any person obtaining a copy
73
- * of this software and associated documentation files (the "Software"), to deal
74
- * in the Software without restriction, including without limitation the rights
75
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
76
- * copies of the Software, and to permit persons to whom the Software is
77
- * furnished to do so, subject to the following conditions:
78
- *
79
- * The above copyright notice and this permission notice shall be included in
80
- * all copies or substantial portions of the Software.
81
- *
82
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
83
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
84
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
85
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
86
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
87
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
88
- * THE SOFTWARE.
89
- */var T=l.SURFACE_SELECTOR,O=l.LABEL_SELECTOR,S=l.ACTION_SELECTOR,y=l.DISMISS_SELECTOR,A=l.OPENING_EVENT,I=l.OPENED_EVENT,M=l.CLOSING_EVENT,C=l.CLOSED_EVENT;var N=function(t){r(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.attachTo=function(t){return new i(t)};i.prototype.initialize=function(t){if(t===void 0){t=function(){return b}}this.announce=t()};i.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl=this.root.querySelector(T);this.labelEl=this.root.querySelector(O);this.actionEl=this.root.querySelector(S);this.handleKeyDown=function(i){t.foundation.handleKeyDown(i)};this.handleSurfaceClick=function(i){var n=i.target;if(t.isActionButton(n)){t.foundation.handleActionButtonClick(i)}else if(t.isActionIcon(n)){t.foundation.handleActionIconClick(i)}};this.registerKeyDownHandler(this.handleKeyDown);this.registerSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.deregisterKeyDownHandler(this.handleKeyDown);this.deregisterSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.open=function(){this.foundation.open()};i.prototype.close=function(t){if(t===void 0){t=""}this.foundation.close(t)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClass:function(i){t.root.classList.add(i)},announce:function(){t.announce(t.labelEl)},notifyClosed:function(i){return t.emit(C,i?{reason:i}:{})},notifyClosing:function(i){return t.emit(M,i?{reason:i}:{})},notifyOpened:function(){return t.emit(I,{})},notifyOpening:function(){return t.emit(A,{})},removeClass:function(i){return t.root.classList.remove(i)}};return new E(i)};Object.defineProperty(i.prototype,"timeoutMs",{get:function(){return this.foundation.getTimeoutMs()},set:function(t){this.foundation.setTimeoutMs(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"closeOnEscape",{get:function(){return this.foundation.getCloseOnEscape()},set:function(t){this.foundation.setCloseOnEscape(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"labelText",{get:function(){return this.labelEl.textContent},set:function(t){this.labelEl.textContent=t},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"actionButtonText",{get:function(){return this.actionEl.textContent},set:function(t){this.actionEl.textContent=t},enumerable:false,configurable:true});i.prototype.registerKeyDownHandler=function(t){this.listen("keydown",t)};i.prototype.deregisterKeyDownHandler=function(t){this.unlisten("keydown",t)};i.prototype.registerSurfaceClickHandler=function(t){this.surfaceEl.addEventListener("click",t)};i.prototype.deregisterSurfaceClickHandler=function(t){this.surfaceEl.removeEventListener("click",t)};i.prototype.isActionButton=function(t){return Boolean(u(t,S))};i.prototype.isActionIcon=function(t){return Boolean(u(t,y))};return i}(o);const w="*{box-sizing:border-box}.mdc-snackbar{top:var(--snackbar-top, auto);right:var(--snackbar-right, 0);bottom:var(--snackbar-bottom, 0);left:var(--snackbar-left, 0);display:none;position:fixed;z-index:8;padding:0.75rem;align-items:center;justify-content:center}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1}.mdc-snackbar__surface{transition:opacity 0.2s cubic-bezier(0, 0, 0.2, 1), transform 0.2s cubic-bezier(0, 0, 0.2, 1);padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;min-width:unset;max-width:42rem;transform:scale(0.8);opacity:0;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.mdc-snackbar__label{visibility:hidden;color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:0.8125rem;font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.mdc-snackbar__actions{visibility:hidden;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.mdc-snackbar__actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--mdc-theme-on-surface:rgb(var(--contrast-100));--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--mdc-theme-primary);--track-color:rgb(var(--contrast-800), 0.2);position:absolute;top:-0.9rem;left:-0.9rem;transform:scale(0.8);display:flex;align-items:center;justify-content:center}.dismiss limel-icon-button.mdc-snackbar__dismiss{transform:scale(0.8);margin:0;padding:0}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}.mdc-snackbar--open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}";const x=class{constructor(n){t(this,n);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-snackbar");if(!t){return}this.mdcSnackbar=new N(t);this.mdcSnackbar.listen("MDCSnackbar:closing",this.handleMdcClosing)}disconnectedCallback(){this.mdcSnackbar.unlisten("MDCSnackbar:closing",this.handleMdcClosing);this.mdcSnackbar.destroy()}async show(){if(this.timeout){this.mdcSnackbar.timeoutMs=this.timeout}this.mdcSnackbar.labelText=this.message;this.mdcSnackbar.open()}render(){return n("aside",{class:`\n mdc-snackbar\n ${this.multiline?"mdc-snackbar--stacked":""}\n `,style:{"--snackbar-timeout":`${this.timeout}ms`}},n("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},n("div",{class:"mdc-snackbar__label","aria-atomic":"false"}),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}handleMdcClosing(t){if(t.detail.reason==="action"){this.action.emit()}else{this.hide.emit()}}renderActions(t){if(!t){return}return n("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return n("limel-button",{class:"mdc-button mdc-snackbar__action",label:t})}renderDismissButton(t){if(!t){return}const i=e.get("snackbar.dismiss",this.language);return n("div",{class:"dismiss"},this.renderTimeoutVisualization(),n("limel-icon-button",{class:"mdc-icon-button mdc-snackbar__dismiss",icon:"multiply",label:i}))}renderTimeoutVisualization(){return n("svg",{width:"36",height:"36",viewBox:"0 0 36 36"},n("circle",{r:"18",cx:"18",cy:"18",fill:"var(--track-color)"}),n("path",{class:"track",d:"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0",stroke:"var(--fill-color)"}))}get host(){return s(this)}};x.style=w;export{x as limel_snackbar};
90
- //# sourceMappingURL=p-480884e6.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["cssClasses","CLOSING","OPEN","OPENING","strings","ACTION_SELECTOR","ARIA_LIVE_LABEL_TEXT_ATTR","CLOSED_EVENT","CLOSING_EVENT","DISMISS_SELECTOR","LABEL_SELECTOR","OPENED_EVENT","OPENING_EVENT","REASON_ACTION","REASON_DISMISS","SURFACE_SELECTOR","numbers","DEFAULT_AUTO_DISMISS_TIMEOUT_MS","INDETERMINATE","MAX_AUTO_DISMISS_TIMEOUT_MS","MIN_AUTO_DISMISS_TIMEOUT_MS","SNACKBAR_ANIMATION_CLOSE_TIME_MS","SNACKBAR_ANIMATION_OPEN_TIME_MS","ARIA_LIVE_DELAY_MS","announce","ariaEl","labelEl","priority","getAttribute","labelText","textContent","trim","setAttribute","innerHTML","setTimeout","removeAttribute","MDCSnackbarFoundation","_super","__extends","adapter","_this","call","this","__assign","defaultAdapter","opened","animationFrame","animationTimer","autoDismissTimer","autoDismissTimeoutMs","closeOnEscape","Object","defineProperty","get","enumerable","configurable","addClass","undefined","notifyClosed","notifyClosing","notifyOpened","notifyOpening","removeClass","prototype","destroy","clearAutoDismissTimer","cancelAnimationFrame","clearTimeout","open","runNextAnimationFrame","timeoutMs","getTimeoutMs","handleAnimationTimerEnd","close","reason","isOpen","setTimeoutMs","minValue","maxValue","indeterminateValue","Error","getCloseOnEscape","setCloseOnEscape","handleKeyDown","evt","isEscapeKey","key","keyCode","handleActionButtonClick","_evt","handleActionIconClick","callback","requestAnimationFrame","MDCFoundation","MDCSnackbar","apply","arguments","attachTo","root","initialize","announcerFactory","util.announce","initialSyncWithDOM","surfaceEl","querySelector","actionEl","foundation","handleSurfaceClick","target","isActionButton","isActionIcon","registerKeyDownHandler","registerSurfaceClickHandler","deregisterKeyDownHandler","deregisterSurfaceClickHandler","getDefaultFoundation","className","classList","add","emit","remove","set","actionButtonText","handler","listen","unlisten","addEventListener","removeEventListener","Boolean","closest","MDCComponent","snackbarCss","Snackbar","constructor","hostRef","handleMdcClosing","bind","connectedCallback","componentDidLoad","element","host","shadowRoot","mdcSnackbar","disconnectedCallback","async","timeout","message","render","h","class","multiline","style","role","renderActions","actionText","renderDismissButton","dismissible","event","detail","action","hide","renderActionButton","label","translate","language","renderTimeoutVisualization","icon","width","height","viewBox","r","cx","cy","fill","d","stroke"],"sources":["./node_modules/@material/snackbar/constants.js","./node_modules/@material/snackbar/util.js","./node_modules/@material/snackbar/foundation.js","./node_modules/@material/snackbar/component.js","./src/components/snackbar/snackbar.scss?tag=limel-snackbar&encapsulation=shadow","./src/components/snackbar/snackbar.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssClasses = {\n CLOSING: 'mdc-snackbar--closing',\n OPEN: 'mdc-snackbar--open',\n OPENING: 'mdc-snackbar--opening',\n};\nvar strings = {\n ACTION_SELECTOR: '.mdc-snackbar__action',\n ARIA_LIVE_LABEL_TEXT_ATTR: 'data-mdc-snackbar-label-text',\n CLOSED_EVENT: 'MDCSnackbar:closed',\n CLOSING_EVENT: 'MDCSnackbar:closing',\n DISMISS_SELECTOR: '.mdc-snackbar__dismiss',\n LABEL_SELECTOR: '.mdc-snackbar__label',\n OPENED_EVENT: 'MDCSnackbar:opened',\n OPENING_EVENT: 'MDCSnackbar:opening',\n REASON_ACTION: 'action',\n REASON_DISMISS: 'dismiss',\n SURFACE_SELECTOR: '.mdc-snackbar__surface',\n};\nvar numbers = {\n DEFAULT_AUTO_DISMISS_TIMEOUT_MS: 5000,\n INDETERMINATE: -1,\n MAX_AUTO_DISMISS_TIMEOUT_MS: 10000,\n MIN_AUTO_DISMISS_TIMEOUT_MS: 4000,\n // These variables need to be kept in sync with the values in _variables.scss.\n SNACKBAR_ANIMATION_CLOSE_TIME_MS: 75,\n SNACKBAR_ANIMATION_OPEN_TIME_MS: 150,\n /**\n * Number of milliseconds to wait between temporarily clearing the label text\n * in the DOM and subsequently restoring it. This is necessary to force IE 11\n * to pick up the `aria-live` content change and announce it to the user.\n */\n ARIA_LIVE_DELAY_MS: 1000,\n};\nexport { cssClasses, strings, numbers };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { numbers, strings } from './constants';\nvar ARIA_LIVE_DELAY_MS = numbers.ARIA_LIVE_DELAY_MS;\nvar ARIA_LIVE_LABEL_TEXT_ATTR = strings.ARIA_LIVE_LABEL_TEXT_ATTR;\nfunction announce(ariaEl, labelEl) {\n if (labelEl === void 0) { labelEl = ariaEl; }\n var priority = ariaEl.getAttribute('aria-live');\n // Trim text to ignore `&nbsp;` (see below).\n // textContent is only null if the node is a document, DOCTYPE, or notation.\n var labelText = labelEl.textContent.trim();\n if (!labelText || !priority) {\n return;\n }\n // Temporarily disable `aria-live` to prevent JAWS+Firefox from announcing the message twice.\n ariaEl.setAttribute('aria-live', 'off');\n // Temporarily clear `textContent` to force a DOM mutation event that will be detected by screen readers.\n // `aria-live` elements are only announced when the element's `textContent` *changes*, so snackbars\n // sent to the browser in the initial HTML response won't be read unless we clear the element's `textContent` first.\n // Similarly, displaying the same snackbar message twice in a row doesn't trigger a DOM mutation event,\n // so screen readers won't announce the second message unless we first clear `textContent`.\n //\n // We have to clear the label text two different ways to make it work in all browsers and screen readers:\n //\n // 1. `textContent = ''` is required for IE11 + JAWS\n // 2. `innerHTML = '&nbsp;'` is required for Chrome + JAWS and NVDA\n //\n // All other browser/screen reader combinations support both methods.\n //\n // The wrapper `<span>` visually hides the space character so that it doesn't cause jank when added/removed.\n // N.B.: Setting `position: absolute`, `opacity: 0`, or `height: 0` prevents Chrome from detecting the DOM change.\n //\n // This technique has been tested in:\n //\n // * JAWS 2019:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * NVDA 2018:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * ChromeVox 53\n labelEl.textContent = '';\n labelEl.innerHTML = '<span style=\"display: inline-block; width: 0; height: 1px;\">&nbsp;</span>';\n // Prevent visual jank by temporarily displaying the label text in the ::before pseudo-element.\n // CSS generated content is normally announced by screen readers\n // (except in IE 11; see https://tink.uk/accessibility-support-for-css-generated-content/);\n // however, `aria-live` is turned off, so this DOM update will be ignored by screen readers.\n labelEl.setAttribute(ARIA_LIVE_LABEL_TEXT_ATTR, labelText);\n setTimeout(function () {\n // Allow screen readers to announce changes to the DOM again.\n ariaEl.setAttribute('aria-live', priority);\n // Remove the message from the ::before pseudo-element.\n labelEl.removeAttribute(ARIA_LIVE_LABEL_TEXT_ATTR);\n // Restore the original label text, which will be announced by screen readers.\n labelEl.textContent = labelText;\n }, ARIA_LIVE_DELAY_MS);\n}\nexport { announce };\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar OPENING = cssClasses.OPENING, OPEN = cssClasses.OPEN, CLOSING = cssClasses.CLOSING;\nvar REASON_ACTION = strings.REASON_ACTION, REASON_DISMISS = strings.REASON_DISMISS;\nvar MDCSnackbarFoundation = /** @class */ (function (_super) {\n __extends(MDCSnackbarFoundation, _super);\n function MDCSnackbarFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCSnackbarFoundation.defaultAdapter), adapter)) || this;\n _this.opened = false;\n _this.animationFrame = 0;\n _this.animationTimer = 0;\n _this.autoDismissTimer = 0;\n _this.autoDismissTimeoutMs = numbers.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;\n _this.closeOnEscape = true;\n return _this;\n }\n Object.defineProperty(MDCSnackbarFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n announce: function () { return undefined; },\n notifyClosed: function () { return undefined; },\n notifyClosing: function () { return undefined; },\n notifyOpened: function () { return undefined; },\n notifyOpening: function () { return undefined; },\n removeClass: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCSnackbarFoundation.prototype.destroy = function () {\n this.clearAutoDismissTimer();\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = 0;\n this.adapter.removeClass(OPENING);\n this.adapter.removeClass(OPEN);\n this.adapter.removeClass(CLOSING);\n };\n MDCSnackbarFoundation.prototype.open = function () {\n var _this = this;\n this.clearAutoDismissTimer();\n this.opened = true;\n this.adapter.notifyOpening();\n this.adapter.removeClass(CLOSING);\n this.adapter.addClass(OPENING);\n this.adapter.announce();\n // Wait a frame once display is no longer \"none\", to establish basis for animation\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(OPEN);\n _this.animationTimer = setTimeout(function () {\n var timeoutMs = _this.getTimeoutMs();\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyOpened();\n if (timeoutMs !== numbers.INDETERMINATE) {\n _this.autoDismissTimer = setTimeout(function () {\n _this.close(REASON_DISMISS);\n }, timeoutMs);\n }\n }, numbers.SNACKBAR_ANIMATION_OPEN_TIME_MS);\n });\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbarFoundation.prototype.close = function (reason) {\n var _this = this;\n if (reason === void 0) { reason = ''; }\n if (!this.opened) {\n // Avoid redundant close calls (and events), e.g. repeated interactions as the snackbar is animating closed\n return;\n }\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n this.clearAutoDismissTimer();\n this.opened = false;\n this.adapter.notifyClosing(reason);\n this.adapter.addClass(cssClasses.CLOSING);\n this.adapter.removeClass(cssClasses.OPEN);\n this.adapter.removeClass(cssClasses.OPENING);\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(function () {\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyClosed(reason);\n }, numbers.SNACKBAR_ANIMATION_CLOSE_TIME_MS);\n };\n MDCSnackbarFoundation.prototype.isOpen = function () {\n return this.opened;\n };\n MDCSnackbarFoundation.prototype.getTimeoutMs = function () {\n return this.autoDismissTimeoutMs;\n };\n MDCSnackbarFoundation.prototype.setTimeoutMs = function (timeoutMs) {\n // Use shorter variable names to make the code more readable\n var minValue = numbers.MIN_AUTO_DISMISS_TIMEOUT_MS;\n var maxValue = numbers.MAX_AUTO_DISMISS_TIMEOUT_MS;\n var indeterminateValue = numbers.INDETERMINATE;\n if (timeoutMs === numbers.INDETERMINATE || (timeoutMs <= maxValue && timeoutMs >= minValue)) {\n this.autoDismissTimeoutMs = timeoutMs;\n }\n else {\n throw new Error(\"\\n timeoutMs must be an integer in the range \" + minValue + \"\\u2013\" + maxValue + \"\\n (or \" + indeterminateValue + \" to disable), but got '\" + timeoutMs + \"'\");\n }\n };\n MDCSnackbarFoundation.prototype.getCloseOnEscape = function () {\n return this.closeOnEscape;\n };\n MDCSnackbarFoundation.prototype.setCloseOnEscape = function (closeOnEscape) {\n this.closeOnEscape = closeOnEscape;\n };\n MDCSnackbarFoundation.prototype.handleKeyDown = function (evt) {\n var isEscapeKey = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscapeKey && this.getCloseOnEscape()) {\n this.close(REASON_DISMISS);\n }\n };\n MDCSnackbarFoundation.prototype.handleActionButtonClick = function (_evt) {\n this.close(REASON_ACTION);\n };\n MDCSnackbarFoundation.prototype.handleActionIconClick = function (_evt) {\n this.close(REASON_DISMISS);\n };\n MDCSnackbarFoundation.prototype.clearAutoDismissTimer = function () {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = 0;\n };\n MDCSnackbarFoundation.prototype.handleAnimationTimerEnd = function () {\n this.animationTimer = 0;\n this.adapter.removeClass(cssClasses.OPENING);\n this.adapter.removeClass(cssClasses.CLOSING);\n };\n /**\n * Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.\n */\n MDCSnackbarFoundation.prototype.runNextAnimationFrame = function (callback) {\n var _this = this;\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(function () {\n _this.animationFrame = 0;\n clearTimeout(_this.animationTimer);\n _this.animationTimer = setTimeout(callback, 0);\n });\n };\n return MDCSnackbarFoundation;\n}(MDCFoundation));\nexport { MDCSnackbarFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCSnackbarFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { closest } from '@material/dom/ponyfill';\nimport { strings } from './constants';\nimport { MDCSnackbarFoundation } from './foundation';\nimport * as util from './util';\nvar SURFACE_SELECTOR = strings.SURFACE_SELECTOR, LABEL_SELECTOR = strings.LABEL_SELECTOR, ACTION_SELECTOR = strings.ACTION_SELECTOR, DISMISS_SELECTOR = strings.DISMISS_SELECTOR, OPENING_EVENT = strings.OPENING_EVENT, OPENED_EVENT = strings.OPENED_EVENT, CLOSING_EVENT = strings.CLOSING_EVENT, CLOSED_EVENT = strings.CLOSED_EVENT;\nvar MDCSnackbar = /** @class */ (function (_super) {\n __extends(MDCSnackbar, _super);\n function MDCSnackbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCSnackbar.attachTo = function (root) {\n return new MDCSnackbar(root);\n };\n MDCSnackbar.prototype.initialize = function (announcerFactory) {\n if (announcerFactory === void 0) { announcerFactory = function () { return util.announce; }; }\n this.announce = announcerFactory();\n };\n MDCSnackbar.prototype.initialSyncWithDOM = function () {\n var _this = this;\n this.surfaceEl = this.root.querySelector(SURFACE_SELECTOR);\n this.labelEl = this.root.querySelector(LABEL_SELECTOR);\n this.actionEl = this.root.querySelector(ACTION_SELECTOR);\n this.handleKeyDown = function (evt) {\n _this.foundation.handleKeyDown(evt);\n };\n this.handleSurfaceClick = function (evt) {\n var target = evt.target;\n if (_this.isActionButton(target)) {\n _this.foundation.handleActionButtonClick(evt);\n }\n else if (_this.isActionIcon(target)) {\n _this.foundation.handleActionIconClick(evt);\n }\n };\n this.registerKeyDownHandler(this.handleKeyDown);\n this.registerSurfaceClickHandler(this.handleSurfaceClick);\n };\n MDCSnackbar.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.deregisterKeyDownHandler(this.handleKeyDown);\n this.deregisterSurfaceClickHandler(this.handleSurfaceClick);\n };\n MDCSnackbar.prototype.open = function () {\n this.foundation.open();\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbar.prototype.close = function (reason) {\n if (reason === void 0) { reason = ''; }\n this.foundation.close(reason);\n };\n MDCSnackbar.prototype.getDefaultFoundation = function () {\n var _this = this;\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n var adapter = {\n addClass: function (className) {\n _this.root.classList.add(className);\n },\n announce: function () {\n _this.announce(_this.labelEl);\n },\n notifyClosed: function (reason) { return _this.emit(CLOSED_EVENT, reason ? { reason: reason } : {}); },\n notifyClosing: function (reason) { return _this.emit(CLOSING_EVENT, reason ? { reason: reason } : {}); },\n notifyOpened: function () { return _this.emit(OPENED_EVENT, {}); },\n notifyOpening: function () { return _this.emit(OPENING_EVENT, {}); },\n removeClass: function (className) { return _this.root.classList.remove(className); },\n };\n return new MDCSnackbarFoundation(adapter);\n };\n Object.defineProperty(MDCSnackbar.prototype, \"timeoutMs\", {\n get: function () {\n return this.foundation.getTimeoutMs();\n },\n set: function (timeoutMs) {\n this.foundation.setTimeoutMs(timeoutMs);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"closeOnEscape\", {\n get: function () {\n return this.foundation.getCloseOnEscape();\n },\n set: function (closeOnEscape) {\n this.foundation.setCloseOnEscape(closeOnEscape);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"isOpen\", {\n get: function () {\n return this.foundation.isOpen();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"labelText\", {\n get: function () {\n // This property only returns null if the node is a document, DOCTYPE,\n // or notation. On Element nodes, it always returns a string.\n return this.labelEl.textContent;\n },\n set: function (labelText) {\n this.labelEl.textContent = labelText;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"actionButtonText\", {\n get: function () {\n return this.actionEl.textContent;\n },\n set: function (actionButtonText) {\n this.actionEl.textContent = actionButtonText;\n },\n enumerable: false,\n configurable: true\n });\n MDCSnackbar.prototype.registerKeyDownHandler = function (handler) {\n this.listen('keydown', handler);\n };\n MDCSnackbar.prototype.deregisterKeyDownHandler = function (handler) {\n this.unlisten('keydown', handler);\n };\n MDCSnackbar.prototype.registerSurfaceClickHandler = function (handler) {\n this.surfaceEl.addEventListener('click', handler);\n };\n MDCSnackbar.prototype.deregisterSurfaceClickHandler = function (handler) {\n this.surfaceEl.removeEventListener('click', handler);\n };\n MDCSnackbar.prototype.isActionButton = function (target) {\n return Boolean(closest(target, ACTION_SELECTOR));\n };\n MDCSnackbar.prototype.isActionIcon = function (target) {\n return Boolean(closest(target, DISMISS_SELECTOR));\n };\n return MDCSnackbar;\n}(MDCComponent));\nexport { MDCSnackbar };\n//# sourceMappingURL=component.js.map","/**\n * @prop --snackbar-top: Snackbar has `position: fixed;` and uses `--snackbar-top`, which defaults to `auto` for its `top` property. See the examples in the documentations for further info.\n * @prop --snackbar-right: Snackbar has `position: fixed;` and uses `--snackbar-right`, which defaults to `0` for its `right` property. See the examples in the documentations for further info.\n * @prop --snackbar-bottom: Snackbar has `position: fixed;` and uses `--snackbar-bottom`, which defaults to `0` for its `bottom` property. See the examples in the documentations for further info.\n * @prop --snackbar-left: Snackbar has `position: fixed;` and uses `--snackbar-left`, which defaults to `0` for its `left` property. See the examples in the documentations for further info.\n */\n\n* {\n box-sizing: border-box;\n}\n\n.mdc-snackbar {\n top: var(--snackbar-top, auto);\n right: var(--snackbar-right, 0);\n bottom: var(--snackbar-bottom, 0);\n left: var(--snackbar-left, 0);\n\n display: none;\n position: fixed;\n z-index: 8;\n\n padding: 0.75rem;\n\n align-items: center;\n justify-content: center;\n}\n\n.mdc-snackbar--opening,\n.mdc-snackbar--open,\n.mdc-snackbar--closing {\n display: flex;\n}\n\n.mdc-snackbar--open {\n .mdc-snackbar__label,\n .mdc-snackbar__actions {\n visibility: visible;\n }\n\n .mdc-snackbar__surface {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n.mdc-snackbar__surface {\n transition:\n opacity 0.2s cubic-bezier(0, 0, 0.2, 1),\n transform 0.2s cubic-bezier(0, 0, 0.2, 1);\n padding: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 0.25rem;\n\n min-height: 3.25rem;\n min-width: unset;\n max-width: 42rem;\n\n transform: scale(0.8);\n opacity: 0;\n border-radius: 0.75rem;\n\n background-color: rgb(var(--contrast-1400));\n box-shadow: var(--shadow-depth-8), var(--shadow-depth-16);\n}\n\n.mdc-snackbar__label {\n visibility: hidden;\n\n color: rgb(var(--contrast-100));\n\n -webkit-font-smoothing: antialiased;\n font-size: 0.8125rem;\n font-weight: 400;\n padding: 0 0.25rem;\n\n width: 100%;\n flex-grow: 1;\n}\n\n.mdc-snackbar__actions {\n visibility: hidden;\n\n display: flex;\n flex-shrink: 0;\n align-items: center;\n box-sizing: border-box;\n gap: 0.5rem;\n}\n\n.dismiss,\n.mdc-snackbar__actions {\n --lime-elevated-surface-background-color: rgb(\n var(--contrast-1300)\n ); // background color of the buttons\n}\n\n.dismiss {\n --mdc-theme-on-surface: rgb(var(--contrast-100)); // color of the X icon\n --icon-background-color: var(--lime-elevated-surface-background-color);\n --fill-color: var(--mdc-theme-primary);\n --track-color: rgb(var(--contrast-800), 0.2);\n position: absolute;\n top: -0.9rem;\n left: -0.9rem;\n transform: scale(0.8);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n limel-icon-button.mdc-snackbar__dismiss {\n transform: scale(0.8);\n margin: 0;\n padding: 0;\n }\n\n svg {\n position: absolute;\n transform: rotate(90deg);\n fill: transparent;\n stroke-dasharray: 100;\n stroke-linecap: round;\n\n .mdc-snackbar--open & {\n animation: timeout var(--snackbar-timeout) linear forwards;\n }\n }\n}\n\n@keyframes timeout {\n 0% {\n stroke-width: 4;\n stroke-dashoffset: 0;\n opacity: 1;\n }\n 100% {\n stroke-width: 1;\n stroke-dashoffset: -100;\n opacity: 0.7;\n }\n}\n","import { Languages } from '../date-picker/date.types';\nimport { MDCSnackbar, MDCSnackbarCloseEvent } from '@material/snackbar';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Method,\n Prop,\n} from '@stencil/core';\nimport translate from '../../global/translations';\n\n/**\n * A Snackbar –also known as \"Toast\"– is used to inform the end user\n * about an action or a process in the system.\n * The information could vary from announcing that a process has just started,\n * is taking place now, has ended, or has been interrupted or canceled.\n *\n * The information that you provide using a snackbar should be:\n * - temporary\n * - contextual\n * - short\n * - and most importantly, ignorable.\n *\n * It means if the user misses the information, it shouldn't be a big deal.\n *\n * :::note\n * If the information you want to display has a higher importance or priority,\n * and you need to make sure that the user takes an action to dismiss it,\n * consider using the [Banner](/#/component/limel-banner/) component instead.\n * For more complex interactions and for delivering more detailed information,\n * [Dialog](/#/component/limel-dialog/) is a better choice.\n * :::\n *\n * @exampleComponent limel-example-snackbar\n * @exampleComponent limel-example-snackbar-dismissible\n * @exampleComponent limel-example-snackbar-with-action\n * @exampleComponent limel-example-snackbar-with-changing-messages\n * @exampleComponent limel-example-snackbar-positioning\n */\n\n@Component({\n tag: 'limel-snackbar',\n shadow: true,\n styleUrl: 'snackbar.scss',\n})\nexport class Snackbar {\n /**\n * The text message to display.\n */\n @Prop()\n public message: string;\n\n /**\n * The amount of time in milliseconds to show the snackbar.\n */\n @Prop()\n // eslint-disable-next-line no-magic-numbers\n public timeout?: number = 5000;\n\n /**\n * The text to display for the action button.\n */\n @Prop()\n public actionText: string;\n\n /**\n * When `true` displays a dismiss button on the snackbar,\n * allowing users to close it.\n */\n @Prop()\n public dismissible: boolean = true;\n\n /**\n * Whether to show the snackbar with space for multiple lines of text\n */\n @Prop()\n public multiline: boolean;\n\n /**\n * Defines the language for translations.\n */\n @Prop()\n public language: Languages = 'en';\n\n @Element()\n private host: HTMLLimelSnackbarElement;\n\n /**\n * Emitted when the action button is pressed\n */\n @Event()\n private action: EventEmitter<void>;\n\n /**\n * Emitted when the snackbar hides itself\n */\n @Event()\n private hide: EventEmitter<void>;\n\n private mdcSnackbar: MDCSnackbar;\n\n constructor() {\n this.handleMdcClosing = this.handleMdcClosing.bind(this);\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector('.mdc-snackbar');\n if (!element) {\n return;\n }\n\n this.mdcSnackbar = new MDCSnackbar(element);\n\n this.mdcSnackbar.listen('MDCSnackbar:closing', this.handleMdcClosing);\n }\n\n public disconnectedCallback() {\n this.mdcSnackbar.unlisten('MDCSnackbar:closing', this.handleMdcClosing);\n this.mdcSnackbar.destroy();\n }\n\n /**\n * Show the snackbar\n */\n @Method()\n public async show() {\n if (this.timeout) {\n this.mdcSnackbar.timeoutMs = this.timeout;\n }\n\n this.mdcSnackbar.labelText = this.message;\n\n this.mdcSnackbar.open();\n }\n\n public render() {\n return (\n <aside\n class={`\n mdc-snackbar\n ${this.multiline ? 'mdc-snackbar--stacked' : ''}\n `}\n style={{\n '--snackbar-timeout': `${this.timeout}ms`,\n }}\n >\n <div\n class=\"mdc-snackbar__surface\"\n role=\"status\"\n aria-relevant=\"additions\"\n >\n <div class=\"mdc-snackbar__label\" aria-atomic=\"false\"></div>\n {this.renderActions(this.actionText)}\n {this.renderDismissButton(this.dismissible)}\n </div>\n </aside>\n );\n }\n\n private handleMdcClosing(event: MDCSnackbarCloseEvent) {\n if (event.detail.reason === 'action') {\n this.action.emit();\n } else {\n this.hide.emit();\n }\n }\n\n private renderActions(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <div class=\"mdc-snackbar__actions\" aria-atomic=\"true\">\n {this.renderActionButton(actionText)}\n </div>\n );\n }\n\n private renderActionButton(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <limel-button\n class=\"mdc-button mdc-snackbar__action\"\n label={actionText}\n />\n );\n }\n\n private renderDismissButton(dismissible: boolean) {\n if (!dismissible) {\n return;\n }\n\n const label = translate.get('snackbar.dismiss', this.language);\n\n return (\n <div class=\"dismiss\">\n {this.renderTimeoutVisualization()}\n <limel-icon-button\n class=\"mdc-icon-button mdc-snackbar__dismiss\"\n icon=\"multiply\"\n label={label}\n />\n </div>\n );\n }\n\n private renderTimeoutVisualization() {\n return (\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\n <circle r=\"18\" cx=\"18\" cy=\"18\" fill=\"var(--track-color)\" />\n <path\n class=\"track\"\n d=\"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0\"\n stroke=\"var(--fill-color)\"\n />\n </svg>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAsBA,IAAIA,EAAa,CACbC,QAAS,wBACTC,KAAM,qBACNC,QAAS,yBAEb,IAAIC,EAAU,CACVC,gBAAiB,wBACjBC,0BAA2B,+BAC3BC,aAAc,qBACdC,cAAe,sBACfC,iBAAkB,yBAClBC,eAAgB,uBAChBC,aAAc,qBACdC,cAAe,sBACfC,cAAe,SACfC,eAAgB,UAChBC,iBAAkB,0BAEtB,IAAIC,EAAU,CACVC,gCAAiC,IACjCC,eAAgB,EAChBC,4BAA6B,IAC7BC,4BAA6B,IAE7BC,iCAAkC,GAClCC,gCAAiC,IAMjCC,mBAAoB;;;;;;;;;;;;;;;;;;;;;;GC9BxB,IAAIA,EAAqBP,EAAQO,mBACjC,IAAIjB,EAA4BF,EAAQE,0BACxC,SAASkB,EAASC,EAAQC,GACtB,GAAIA,SAAiB,EAAG,CAAEA,EAAUD,CAAO,CAC3C,IAAIE,EAAWF,EAAOG,aAAa,aAGnC,IAAIC,EAAYH,EAAQI,YAAYC,OAC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