@limetech/lime-elements 37.1.0-next.97 → 37.1.0-next.98

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 (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/{get-icon-props-3b021a11.js → get-icon-props-c79a8f9d.js} +6 -6
  3. package/dist/cjs/get-icon-props-c79a8f9d.js.map +1 -0
  4. package/dist/cjs/limel-action-bar-item_2.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-breadcrumbs_3.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-chip.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-header.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-input-field_3.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-picker.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-select.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
  17. package/dist/cjs/limel-tab-bar.cjs.entry.js +1 -1
  18. package/dist/collection/components/checkbox/checkbox.js +4 -1
  19. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  20. package/dist/collection/components/icon/get-icon-props.js +5 -5
  21. package/dist/collection/components/icon/get-icon-props.js.map +1 -1
  22. package/dist/collection/components/switch/switch.js +4 -1
  23. package/dist/collection/components/switch/switch.js.map +1 -1
  24. package/dist/esm/{get-icon-props-8e2a0505.js → get-icon-props-990e4467.js} +6 -6
  25. package/dist/esm/get-icon-props-990e4467.js.map +1 -0
  26. package/dist/esm/limel-action-bar-item_2.entry.js +1 -1
  27. package/dist/esm/limel-breadcrumbs_3.entry.js +1 -1
  28. package/dist/esm/limel-checkbox.entry.js.map +1 -1
  29. package/dist/esm/limel-chip-set.entry.js +1 -1
  30. package/dist/esm/limel-chip.entry.js +1 -1
  31. package/dist/esm/limel-file.entry.js +1 -1
  32. package/dist/esm/limel-header.entry.js +1 -1
  33. package/dist/esm/limel-input-field_3.entry.js +1 -1
  34. package/dist/esm/limel-picker.entry.js +1 -1
  35. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  36. package/dist/esm/limel-progress-flow.entry.js +1 -1
  37. package/dist/esm/limel-select.entry.js +1 -1
  38. package/dist/esm/limel-switch.entry.js.map +1 -1
  39. package/dist/esm/limel-tab-bar.entry.js +1 -1
  40. package/dist/lime-elements/lime-elements.esm.js +1 -1
  41. package/dist/lime-elements/{p-1f689b7d.entry.js → p-1ed66aaf.entry.js} +2 -2
  42. package/dist/lime-elements/{p-8afe01df.entry.js → p-38243caf.entry.js} +2 -2
  43. package/dist/lime-elements/{p-323bc305.entry.js → p-408ffc11.entry.js} +2 -2
  44. package/dist/lime-elements/{p-b8c181ce.entry.js → p-46eb4d95.entry.js} +2 -2
  45. package/dist/lime-elements/{p-558d5d01.entry.js → p-472c46e3.entry.js} +2 -2
  46. package/dist/lime-elements/{p-a407af3a.entry.js → p-5bfdd923.entry.js} +2 -2
  47. package/dist/lime-elements/p-5f026843.js +2 -0
  48. package/dist/lime-elements/p-5f026843.js.map +1 -0
  49. package/dist/lime-elements/{p-0cc099b9.entry.js → p-8c581575.entry.js} +2 -2
  50. package/dist/lime-elements/{p-95561c5f.entry.js → p-af1b74d9.entry.js} +2 -2
  51. package/dist/lime-elements/{p-0e3cd73a.entry.js → p-bed017c5.entry.js} +2 -2
  52. package/dist/lime-elements/p-befdbcee.entry.js.map +1 -1
  53. package/dist/lime-elements/p-c428bb03.entry.js.map +1 -1
  54. package/dist/lime-elements/{p-cb1ba78f.entry.js → p-d292a48e.entry.js} +2 -2
  55. package/dist/lime-elements/{p-b9b48ece.entry.js → p-d6e2b7b1.entry.js} +2 -2
  56. package/dist/lime-elements/{p-22bc684d.entry.js → p-f0980229.entry.js} +2 -2
  57. package/dist/types/components/checkbox/checkbox.d.ts +4 -1
  58. package/dist/types/components/icon/get-icon-props.d.ts +1 -1
  59. package/dist/types/components/switch/switch.d.ts +4 -1
  60. package/dist/types/components.d.ts +32 -8
  61. package/package.json +1 -1
  62. package/dist/cjs/get-icon-props-3b021a11.js.map +0 -1
  63. package/dist/esm/get-icon-props-8e2a0505.js.map +0 -1
  64. package/dist/lime-elements/p-88694767.js +0 -2
  65. package/dist/lime-elements/p-88694767.js.map +0 -1
  66. /package/dist/lime-elements/{p-1f689b7d.entry.js.map → p-1ed66aaf.entry.js.map} +0 -0
  67. /package/dist/lime-elements/{p-8afe01df.entry.js.map → p-38243caf.entry.js.map} +0 -0
  68. /package/dist/lime-elements/{p-323bc305.entry.js.map → p-408ffc11.entry.js.map} +0 -0
  69. /package/dist/lime-elements/{p-b8c181ce.entry.js.map → p-46eb4d95.entry.js.map} +0 -0
  70. /package/dist/lime-elements/{p-558d5d01.entry.js.map → p-472c46e3.entry.js.map} +0 -0
  71. /package/dist/lime-elements/{p-a407af3a.entry.js.map → p-5bfdd923.entry.js.map} +0 -0
  72. /package/dist/lime-elements/{p-0cc099b9.entry.js.map → p-8c581575.entry.js.map} +0 -0
  73. /package/dist/lime-elements/{p-95561c5f.entry.js.map → p-af1b74d9.entry.js.map} +0 -0
  74. /package/dist/lime-elements/{p-0e3cd73a.entry.js.map → p-bed017c5.entry.js.map} +0 -0
  75. /package/dist/lime-elements/{p-cb1ba78f.entry.js.map → p-d292a48e.entry.js.map} +0 -0
  76. /package/dist/lime-elements/{p-b9b48ece.entry.js.map → p-d6e2b7b1.entry.js.map} +0 -0
  77. /package/dist/lime-elements/{p-22bc684d.entry.js.map → p-f0980229.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["CssClasses","Selectors","observeProperty","target","property","observer","targetObservers","installObserver","observers","getObservers","push","splice","indexOf","allTargetObservers","WeakMap","observersMap","Map","has","set","isEnabled","key","get","installedProperties","Set","descriptor","getDescriptor","configurable","enumerable","value","writable","observedDescriptor","__assign","descGet","descSet","value_1","newValue","call","this","e_4","_a","previous","_b","__values","_c","next","done","e_4_1","error","return","add","Object","defineProperty","descriptorTarget","getOwnPropertyDescriptor","getPrototypeOf","setObserversEnabled","enabled","MDCObserverFoundation","_super","__extends","adapter","_this","unobserves","prototype","destroy","unobserve","observe","e_1","cleanup","keys","bind","e_1_1","e_2","cleanup_1","cleanup_1_1","cleanupFn","e_2_1","delete","e_3","__spreadArray","__read","e_3_1","MDCFoundation","MDCSwitchFoundation","handleClick","init","state","disabled","stopProcessingIfDisabled","processing","selected","MDCSwitchRenderFoundation","apply","arguments","onDisabledChange","onProcessingChange","onSelectedChange","initFromDOM","hasClass","SELECTED","isDisabled","PROCESSING","setDisabled","toggleClass","setAriaChecked","String","UNSELECTED","addClass","className","removeClass","MDCSwitch","root","foundation","attachTo","initialize","ripple","MDCRipple","createRippleFoundation","initialSyncWithDOM","rippleElement","querySelector","RIPPLE","Error","addEventListener","removeEventListener","getDefaultFoundation","createAdapter","classList","contains","remove","ariaChecked","setAttribute","MDCRippleFoundation","createRippleAdapter","computeBoundingRect","getBoundingClientRect","isUnbounded","MDCComponent","switchCss","Switch","helperTextId","createRandomString","renderHelperLine","hasHelperText","h","helperText","undefined","event","stopPropagation","change","emit","connectedCallback","componentWillLoad","makeEnterClickable","host","componentDidLoad","element","shadowRoot","mdcSwitch","disconnectedCallback","removeEnterClickable","render","Host","id","fieldId","class","readonly","type","role","onClick","viewBox","d","htmlFor","label","valueWatcher"],"sources":["./node_modules/@material/switch/constants.js","./node_modules/@material/base/observer.js","./node_modules/@material/base/observer-foundation.js","./node_modules/@material/switch/foundation.js","./node_modules/@material/switch/component.js","./src/components/switch/switch.scss?tag=limel-switch&encapsulation=shadow","./src/components/switch/switch.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 */\n/**\n * CSS classes used for switch.\n */\nexport var CssClasses;\n(function (CssClasses) {\n CssClasses[\"PROCESSING\"] = \"mdc-switch--processing\";\n CssClasses[\"SELECTED\"] = \"mdc-switch--selected\";\n CssClasses[\"UNSELECTED\"] = \"mdc-switch--unselected\";\n})(CssClasses || (CssClasses = {}));\n/**\n * Query selectors used for switch.\n */\nexport var Selectors;\n(function (Selectors) {\n Selectors[\"RIPPLE\"] = \".mdc-switch__ripple\";\n})(Selectors || (Selectors = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2021 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, __read, __spreadArray, __values } from \"tslib\";\n/**\n * Mixin to add `MDCObserver` functionality to an optional base class.\n *\n * @deprecated Prefer MDCObserverFoundation for stricter closure compliance.\n * @template C Optional base class constructor type.\n * @param baseClass - Optional base class.\n * @return A class that extends the optional base class with `MDCObserver`\n * functionality.\n */\nexport function mdcObserver(baseClass) {\n if (baseClass === void 0) { baseClass = /** @class */ (function () {\n function class_1() {\n }\n return class_1;\n }()); }\n // Mixin classes cannot use private members and Symbol() cannot be used in 3P\n // for IE11.\n var unobserveMap = new WeakMap();\n return /** @class */ (function (_super) {\n __extends(MDCObserver, _super);\n function MDCObserver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCObserver.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n var unobserves = unobserveMap.get(_this) || [];\n var index = unobserves.indexOf(unobserve);\n if (index > -1) {\n unobserves.splice(index, 1);\n }\n };\n var unobserves = unobserveMap.get(this);\n if (!unobserves) {\n unobserves = [];\n unobserveMap.set(this, unobserves);\n }\n unobserves.push(unobserve);\n return unobserve;\n };\n MDCObserver.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n MDCObserver.prototype.unobserve = function () {\n var e_3, _a;\n // Iterate over a copy since unobserve() will remove themselves from the\n // array\n var unobserves = unobserveMap.get(this) || [];\n try {\n for (var _b = __values(__spreadArray([], __read(unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserver;\n }(baseClass));\n}\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the provided\n * `Observer`.\n */\nexport function observeProperty(target, property, observer) {\n var targetObservers = installObserver(target, property);\n var observers = targetObservers.getObservers(property);\n observers.push(observer);\n return function () {\n observers.splice(observers.indexOf(observer), 1);\n };\n}\n/**\n * A Map of all `TargetObservers` that have been installed.\n */\nvar allTargetObservers = new WeakMap();\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed), and replaces the given property with a getter and setter that\n * will respond to changes and call `TargetObservers`.\n *\n * Subsequent calls to `installObserver()` with the same target and property\n * will not override the property's previously installed getter/setter.\n *\n * @template T The observed target type.\n * @template K The observed property to create a getter/setter for.\n * @param target - The target to observe.\n * @param property - The property to create a getter/setter for, if needed.\n * @return The installed `TargetObservers` for the provided target.\n */\nfunction installObserver(target, property) {\n var observersMap = new Map();\n if (!allTargetObservers.has(target)) {\n allTargetObservers.set(target, {\n isEnabled: true,\n getObservers: function (key) {\n var observers = observersMap.get(key) || [];\n if (!observersMap.has(key)) {\n observersMap.set(key, observers);\n }\n return observers;\n },\n installedProperties: new Set()\n });\n }\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers.installedProperties.has(property)) {\n // The getter/setter has already been replaced for this property\n return targetObservers;\n }\n // Retrieve (or create if it's a plain property) the original descriptor from\n // the target...\n var descriptor = getDescriptor(target, property) || {\n configurable: true,\n enumerable: true,\n value: target[property],\n writable: true\n };\n // ...and create a copy that will be used for the observer.\n var observedDescriptor = __assign({}, descriptor);\n var descGet = descriptor.get, descSet = descriptor.set;\n if ('value' in descriptor) {\n // The descriptor is a simple value (not a getter/setter).\n // For our observer descriptor that we copied, delete the value/writable\n // properties, since they are incompatible with the get/set properties\n // for descriptors.\n delete observedDescriptor.value;\n delete observedDescriptor.writable;\n // Set up a simple getter...\n var value_1 = descriptor.value;\n descGet = function () { return value_1; };\n // ...and setter (if the original property was writable).\n if (descriptor.writable) {\n descSet = function (newValue) {\n value_1 = newValue;\n };\n }\n }\n if (descGet) {\n observedDescriptor.get = function () {\n // `this as T` needed for closure conformance\n return descGet.call(this);\n };\n }\n if (descSet) {\n observedDescriptor.set = function (newValue) {\n var e_4, _a;\n // `thus as T` needed for closure conformance\n var previous = descGet ? descGet.call(this) : newValue;\n descSet.call(this, newValue);\n if (targetObservers.isEnabled && (!descGet || newValue !== previous)) {\n try {\n for (var _b = __values(targetObservers.getObservers(property)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer(newValue, previous);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n };\n }\n targetObservers.installedProperties.add(property);\n Object.defineProperty(target, property, observedDescriptor);\n return targetObservers;\n}\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param target - The target to retrieve a descriptor from.\n * @param property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n * plain properties may not have a descriptor defined.\n */\nexport function getDescriptor(target, property) {\n var descriptorTarget = target;\n var descriptor;\n while (descriptorTarget) {\n descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n if (descriptor) {\n break;\n }\n // Walk up the instance's prototype chain in case the property is declared\n // on a superclass.\n descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n }\n return descriptor;\n}\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param target - The target to enable or disable observers for.\n * @param enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled(target, enabled) {\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers) {\n targetObservers.isEnabled = enabled;\n }\n}\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2021 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, __read, __spreadArray, __values } from \"tslib\";\nimport { MDCFoundation } from './foundation';\nimport { observeProperty, setObserversEnabled } from './observer';\nvar MDCObserverFoundation = /** @class */ (function (_super) {\n __extends(MDCObserverFoundation, _super);\n function MDCObserverFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n /** A set of cleanup functions to unobserve changes. */\n _this.unobserves = new Set();\n return _this;\n }\n MDCObserverFoundation.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.unobserve();\n };\n /**\n * Observe a target's properties for changes using the provided map of\n * property names and observer functions.\n *\n * @template T The target type.\n * @param target - The target to observe.\n * @param observers - An object whose keys are target properties and values\n * are observer functions that are called when the associated property\n * changes.\n * @return A cleanup function that can be called to unobserve the\n * target.\n */\n MDCObserverFoundation.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(this.observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n _this.unobserves.delete(unobserve);\n };\n this.unobserves.add(unobserve);\n return unobserve;\n };\n /**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current\n * and previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the\n * provided `Observer`.\n */\n MDCObserverFoundation.prototype.observeProperty = function (target, property, observer) {\n return observeProperty(target, property, observer);\n };\n /**\n * Enables or disables all observers for the provided target. Disabling\n * observers will prevent them from being called until they are re-enabled.\n *\n * @param target - The target to enable or disable observers for.\n * @param enabled - Whether or not observers should be called.\n */\n MDCObserverFoundation.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n /**\n * Clean up all observers and stop listening for property changes.\n */\n MDCObserverFoundation.prototype.unobserve = function () {\n var e_3, _a;\n try {\n // Iterate over a copy since unobserve() will remove themselves from the set\n for (var _b = __values(__spreadArray([], __read(this.unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserverFoundation;\n}(MDCFoundation));\nexport { MDCObserverFoundation };\n//# sourceMappingURL=observer-foundation.js.map","/**\n * @license\n * Copyright 2021 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 { MDCObserverFoundation } from '@material/base/observer-foundation';\nimport { CssClasses } from './constants';\n/**\n * `MDCSwitchFoundation` provides a state-only foundation for a switch\n * component.\n *\n * State observers and event handler entrypoints update a component's adapter's\n * state with the logic needed for switch to function.\n */\nvar MDCSwitchFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchFoundation, _super);\n function MDCSwitchFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchFoundation.prototype.init = function () {\n this.observe(this.adapter.state, {\n disabled: this.stopProcessingIfDisabled,\n processing: this.stopProcessingIfDisabled,\n });\n };\n /**\n * Event handler for switch click events. Clicking on a switch will toggle its\n * selected state.\n */\n MDCSwitchFoundation.prototype.handleClick = function () {\n if (this.adapter.state.disabled) {\n return;\n }\n this.adapter.state.selected = !this.adapter.state.selected;\n };\n MDCSwitchFoundation.prototype.stopProcessingIfDisabled = function () {\n if (this.adapter.state.disabled) {\n this.adapter.state.processing = false;\n }\n };\n return MDCSwitchFoundation;\n}(MDCObserverFoundation));\nexport { MDCSwitchFoundation };\n/**\n * `MDCSwitchRenderFoundation` provides a state and rendering foundation for a\n * switch component.\n *\n * State observers and event handler entrypoints update a component's\n * adapter's state with the logic needed for switch to function.\n *\n * In response to state changes, the rendering foundation uses the component's\n * render adapter to keep the component's DOM updated with the state.\n */\nvar MDCSwitchRenderFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchRenderFoundation, _super);\n function MDCSwitchRenderFoundation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchRenderFoundation.prototype.init = function () {\n _super.prototype.init.call(this);\n this.observe(this.adapter.state, {\n disabled: this.onDisabledChange,\n processing: this.onProcessingChange,\n selected: this.onSelectedChange,\n });\n };\n /**\n * Initializes the foundation from a server side rendered (SSR) component.\n * This will sync the adapter's state with the current state of the DOM.\n *\n * This method should be called after `init()`.\n */\n MDCSwitchRenderFoundation.prototype.initFromDOM = function () {\n // Turn off observers while setting state\n this.setObserversEnabled(this.adapter.state, false);\n this.adapter.state.selected = this.adapter.hasClass(CssClasses.SELECTED);\n // Ensure aria-checked is set if attribute is not present\n this.onSelectedChange();\n this.adapter.state.disabled = this.adapter.isDisabled();\n this.adapter.state.processing =\n this.adapter.hasClass(CssClasses.PROCESSING);\n // Re-observe state\n this.setObserversEnabled(this.adapter.state, true);\n this.stopProcessingIfDisabled();\n };\n MDCSwitchRenderFoundation.prototype.onDisabledChange = function () {\n this.adapter.setDisabled(this.adapter.state.disabled);\n };\n MDCSwitchRenderFoundation.prototype.onProcessingChange = function () {\n this.toggleClass(this.adapter.state.processing, CssClasses.PROCESSING);\n };\n MDCSwitchRenderFoundation.prototype.onSelectedChange = function () {\n this.adapter.setAriaChecked(String(this.adapter.state.selected));\n this.toggleClass(this.adapter.state.selected, CssClasses.SELECTED);\n this.toggleClass(!this.adapter.state.selected, CssClasses.UNSELECTED);\n };\n MDCSwitchRenderFoundation.prototype.toggleClass = function (addClass, className) {\n if (addClass) {\n this.adapter.addClass(className);\n }\n else {\n this.adapter.removeClass(className);\n }\n };\n return MDCSwitchRenderFoundation;\n}(MDCSwitchFoundation));\nexport { MDCSwitchRenderFoundation };\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2021 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 { MDCComponent } from '@material/base/component';\nimport { MDCRipple } from '@material/ripple/component';\nimport { MDCRippleFoundation } from '@material/ripple/foundation';\nimport { Selectors } from './constants';\nimport { MDCSwitchRenderFoundation } from './foundation';\n/**\n * `MDCSwitch` provides a component implementation of a Material Design switch.\n */\nvar MDCSwitch = /** @class */ (function (_super) {\n __extends(MDCSwitch, _super);\n function MDCSwitch(root, foundation) {\n var _this = _super.call(this, root, foundation) || this;\n _this.root = root;\n return _this;\n }\n /**\n * Creates a new `MDCSwitch` and attaches it to the given root element.\n * @param root The root to attach to.\n * @return the new component instance.\n */\n MDCSwitch.attachTo = function (root) {\n return new MDCSwitch(root);\n };\n MDCSwitch.prototype.initialize = function () {\n this.ripple = new MDCRipple(this.root, this.createRippleFoundation());\n };\n MDCSwitch.prototype.initialSyncWithDOM = function () {\n var rippleElement = this.root.querySelector(Selectors.RIPPLE);\n if (!rippleElement) {\n throw new Error(\"Switch \" + Selectors.RIPPLE + \" element is required.\");\n }\n this.rippleElement = rippleElement;\n this.root.addEventListener('click', this.foundation.handleClick);\n this.foundation.initFromDOM();\n };\n MDCSwitch.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.ripple.destroy();\n this.root.removeEventListener('click', this.foundation.handleClick);\n };\n MDCSwitch.prototype.getDefaultFoundation = function () {\n return new MDCSwitchRenderFoundation(this.createAdapter());\n };\n MDCSwitch.prototype.createAdapter = function () {\n var _this = this;\n return {\n addClass: function (className) {\n _this.root.classList.add(className);\n },\n hasClass: function (className) { return _this.root.classList.contains(className); },\n isDisabled: function () { return _this.root.disabled; },\n removeClass: function (className) {\n _this.root.classList.remove(className);\n },\n setAriaChecked: function (ariaChecked) {\n return _this.root.setAttribute('aria-checked', ariaChecked);\n },\n setDisabled: function (disabled) {\n _this.root.disabled = disabled;\n },\n state: this,\n };\n };\n MDCSwitch.prototype.createRippleFoundation = function () {\n return new MDCRippleFoundation(this.createRippleAdapter());\n };\n MDCSwitch.prototype.createRippleAdapter = function () {\n var _this = this;\n return __assign(__assign({}, MDCRipple.createAdapter(this)), { computeBoundingRect: function () { return _this.rippleElement.getBoundingClientRect(); }, isUnbounded: function () { return true; } });\n };\n return MDCSwitch;\n}(MDCComponent));\nexport { MDCSwitch };\n//# sourceMappingURL=component.js.map","@use '../../style/functions';\n@use '../../style/internal/shared_input-select-picker';\n@use '../../style/internal/lime-theme';\n@use '../../style/internal/lime-typography';\n\n@use '@material/switch/styles';\n\n$scale-factor: 0.8;\n\n:host(limel-switch) {\n isolation: isolate;\n\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n --mdc-switch-selected-icon-color: transparent;\n --mdc-switch-unselected-icon-color: transparent;\n\n --mdc-switch-disabled-selected-icon-opacity: 1;\n --mdc-switch-disabled-unselected-icon-opacity: 1;\n\n --mdc-switch-selected-icon-size: 0.75rem;\n --mdc-switch-unselected-icon-size: 0.75rem;\n\n --mdc-switch-track-height: 1.25rem;\n --mdc-switch-track-shape: var(--mdc-switch-track-height);\n\n --mdc-switch-unselected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n\n --mdc-switch-unselected-track-color: rgb(var(--contrast-700));\n --mdc-switch-unselected-focus-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-pressed-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-hover-track-color: rgb(var(--contrast-800));\n --mdc-switch-selected-focus-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-pressed-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-hover-track-color: var(--mdc-theme-primary);\n\n --mdc-switch-handle-elevation: var(--button-shadow-normal);\n --mdc-switch-disabled-track-opacity: 0.4;\n\n --mdc-switch-disabled-selected-handle-color: rgb(var(--contrast-1000));\n --mdc-switch-disabled-unselected-handle-color: rgb(var(--contrast-1000));\n}\n\n.mdc-switch {\n margin-right: functions.pxToRem(8);\n &:hover {\n --mdc-switch-handle-elevation: var(--button-shadow-hovered);\n }\n}\n\nlabel {\n @include lime-typography.typography(body2);\n color: var(--mdc-theme-on-surface);\n\n cursor: pointer;\n\n &.disabled {\n @include shared_input-select-picker.looks-disabled;\n }\n}\n\nlabel {\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-switch {\n &.mdc-switch--selected,\n &.mdc-switch.mdc-switch--unselected {\n .mdc-switch__handle {\n &:after,\n &:before {\n transform: scale($scale-factor);\n }\n }\n }\n .mdc-switch__shadow {\n transform: scale($scale-factor);\n }\n}\n\n@import './partial-styles/_readonly.scss';\n@import './partial-styles/_helper-text.scss';\n","import { MDCSwitch } from '@material/switch';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from 'src/util/make-enter-clickable';\n\n/**\n * The Switch component is a fundamental element in UI design that serves as a toggle switch\n * to control the state of a specific setting or option in an application or website.\n * The two distinct positions of the Switch are visually indicative of the two states:\n * ON and OFF; making it easy for users to understand the current state of the controlled feature.\n *\n * The Switch component is widely used in user interfaces to enable users to\n * quickly and intuitively change binary settings.\n *\n * <limel-example-switch-vs-checkbox />\n *\n * @exampleComponent limel-example-switch\n * @exampleComponent limel-example-switch-helper-text\n */\n@Component({\n tag: 'limel-switch',\n shadow: true,\n styleUrl: 'switch.scss',\n})\nexport class Switch {\n /**\n * Label to display next to the switch\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Disables the switch when `true`,\n * and visually shows that the switch is editable but disabled.\n * This tells the users that if certain requirements are met,\n * the switch may become interactable.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Disables the switch when `true`. This visualizes the switch slightly differently.\n * But shows no visual sign indicating that the switch 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 is invalid.\n */\n @Prop({ reflect: true })\n public invalid: boolean;\n\n /**\n * The value of the switch\n */\n @Prop({ reflect: true })\n public value = false;\n\n /**\n * Optional helper text to display below the switch\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Emitted when the value has changed\n */\n @Event()\n private change: EventEmitter<boolean>;\n\n @Element()\n private host: HTMLLimelSwitchElement;\n private helperTextId: string = createRandomString();\n\n @State()\n private fieldId = createRandomString();\n\n private mdcSwitch: MDCSwitch;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector(\n '.mdc-switch',\n ) as HTMLButtonElement;\n if (!element) {\n return;\n }\n\n this.mdcSwitch = new MDCSwitch(element);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n this.mdcSwitch?.destroy();\n }\n\n public render() {\n return (\n <Host>\n <button\n id={this.fieldId}\n class={{\n 'mdc-switch': true,\n 'lime-switch--readonly': this.readonly,\n 'mdc-switch--unselected': !this.value,\n 'mdc-switch--selected': this.value,\n }}\n type=\"button\"\n role=\"switch\"\n aria-checked={this.value}\n disabled={this.disabled || this.readonly}\n onClick={this.handleClick}\n aria-controls={this.helperTextId}\n >\n <div class=\"mdc-switch__track\" />\n <div class=\"mdc-switch__handle-track\">\n <div class=\"mdc-switch__handle\">\n <div class=\"mdc-switch__shadow\">\n <div class=\"mdc-elevation-overlay\"></div>\n </div>\n <div class=\"mdc-switch__ripple\"></div>\n <div class=\"mdc-switch__icons\">\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--on\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" />\n </svg>\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--off\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M20 13H4v-2h16v2z\" />\n </svg>\n </div>\n </div>\n </div>\n </button>\n <label\n class={`${\n this.disabled || this.readonly ? 'disabled' : ''\n }`}\n htmlFor={this.fieldId}\n >\n {this.label}\n </label>\n {this.renderHelperLine()}\n </Host>\n );\n }\n\n @Watch('value')\n protected valueWatcher(newValue: boolean) {\n if (!this.mdcSwitch) {\n return;\n }\n\n this.mdcSwitch.selected = newValue;\n }\n\n private renderHelperLine = () => {\n if (!this.hasHelperText()) {\n return;\n }\n\n return (\n <limel-helper-line\n helperTextId={this.helperTextId}\n helperText={this.helperText}\n />\n );\n };\n\n private hasHelperText = () => {\n return this.helperText !== null && this.helperText !== undefined;\n };\n\n private handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.change.emit(!this.value);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAyBO,IAAIA,GACX,SAAWA,GACPA,EAAW,cAAgB,yBAC3BA,EAAW,YAAc,uBACzBA,EAAW,cAAgB,wBAC9B,EAJD,CAIGA,IAAeA,EAAa,KAIxB,IAAIC,GACX,SAAWA,GACPA,EAAU,UAAY,qBACzB,EAFD,CAEGA,IAAcA,EAAY;;;;;;;;;;;;;;;;;;;;;;GCkGtB,SAASC,EAAgBC,EAAQC,EAAUC,GAC9C,IAAIC,EAAkBC,EAAgBJ,EAAQC,GAC9C,IAAII,EAAYF,EAAgBG,aAAaL,GAC7CI,EAAUE,KAAKL,GACf,OAAO,WACHG,EAAUG,OAAOH,EAAUI,QAAQP,GAAW,EACtD,CACA,CAIA,IAAIQ,EAAqB,IAAIC,QAe7B,SAASP,EAAgBJ,EAAQC,GAC7B,IAAIW,EAAe,IAAIC,IACvB,IAAKH,EAAmBI,IAAId,GAAS,CACjCU,EAAmBK,IAAIf,EAAQ,CAC3BgB,UAAW,KACXV,aAAc,SAAUW,GACpB,IAAIZ,EAAYO,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,MAAM,2BAEfrB,EAAA,OAAKqB,MAAM,uBACXrB,EAAA,OAAKqB,MAAM,qBACPrB,EAAA,OACIqB,MAAM,wCACNK,QAAQ,aAER1B,EAAA,QAAM2B,EAAE,yEAEZ3B,EAAA,OACIqB,MAAM,yCACNK,QAAQ,aAER1B,EAAA,QAAM2B,EAAE,2BAM5B3B,EAAA,SACIqB,MAAO,GACHhI,KAAKkD,UAAYlD,KAAKiI,SAAW,WAAa,KAElDM,QAASvI,KAAK+H,SAEb/H,KAAKwI,OAETxI,KAAKyG,mB,CAMRgC,aAAa3I,GACnB,IAAKE,KAAKyH,UAAW,CACjB,M,CAGJzH,KAAKyH,UAAUpE,SAAWvD,C"}
1
+ {"version":3,"names":["CssClasses","Selectors","observeProperty","target","property","observer","targetObservers","installObserver","observers","getObservers","push","splice","indexOf","allTargetObservers","WeakMap","observersMap","Map","has","set","isEnabled","key","get","installedProperties","Set","descriptor","getDescriptor","configurable","enumerable","value","writable","observedDescriptor","__assign","descGet","descSet","value_1","newValue","call","this","e_4","_a","previous","_b","__values","_c","next","done","e_4_1","error","return","add","Object","defineProperty","descriptorTarget","getOwnPropertyDescriptor","getPrototypeOf","setObserversEnabled","enabled","MDCObserverFoundation","_super","__extends","adapter","_this","unobserves","prototype","destroy","unobserve","observe","e_1","cleanup","keys","bind","e_1_1","e_2","cleanup_1","cleanup_1_1","cleanupFn","e_2_1","delete","e_3","__spreadArray","__read","e_3_1","MDCFoundation","MDCSwitchFoundation","handleClick","init","state","disabled","stopProcessingIfDisabled","processing","selected","MDCSwitchRenderFoundation","apply","arguments","onDisabledChange","onProcessingChange","onSelectedChange","initFromDOM","hasClass","SELECTED","isDisabled","PROCESSING","setDisabled","toggleClass","setAriaChecked","String","UNSELECTED","addClass","className","removeClass","MDCSwitch","root","foundation","attachTo","initialize","ripple","MDCRipple","createRippleFoundation","initialSyncWithDOM","rippleElement","querySelector","RIPPLE","Error","addEventListener","removeEventListener","getDefaultFoundation","createAdapter","classList","contains","remove","ariaChecked","setAttribute","MDCRippleFoundation","createRippleAdapter","computeBoundingRect","getBoundingClientRect","isUnbounded","MDCComponent","switchCss","Switch","helperTextId","createRandomString","renderHelperLine","hasHelperText","h","helperText","undefined","event","stopPropagation","change","emit","connectedCallback","componentWillLoad","makeEnterClickable","host","componentDidLoad","element","shadowRoot","mdcSwitch","disconnectedCallback","removeEnterClickable","render","Host","id","fieldId","class","readonly","type","role","onClick","viewBox","d","htmlFor","label","valueWatcher"],"sources":["./node_modules/@material/switch/constants.js","./node_modules/@material/base/observer.js","./node_modules/@material/base/observer-foundation.js","./node_modules/@material/switch/foundation.js","./node_modules/@material/switch/component.js","./src/components/switch/switch.scss?tag=limel-switch&encapsulation=shadow","./src/components/switch/switch.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 */\n/**\n * CSS classes used for switch.\n */\nexport var CssClasses;\n(function (CssClasses) {\n CssClasses[\"PROCESSING\"] = \"mdc-switch--processing\";\n CssClasses[\"SELECTED\"] = \"mdc-switch--selected\";\n CssClasses[\"UNSELECTED\"] = \"mdc-switch--unselected\";\n})(CssClasses || (CssClasses = {}));\n/**\n * Query selectors used for switch.\n */\nexport var Selectors;\n(function (Selectors) {\n Selectors[\"RIPPLE\"] = \".mdc-switch__ripple\";\n})(Selectors || (Selectors = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2021 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, __read, __spreadArray, __values } from \"tslib\";\n/**\n * Mixin to add `MDCObserver` functionality to an optional base class.\n *\n * @deprecated Prefer MDCObserverFoundation for stricter closure compliance.\n * @template C Optional base class constructor type.\n * @param baseClass - Optional base class.\n * @return A class that extends the optional base class with `MDCObserver`\n * functionality.\n */\nexport function mdcObserver(baseClass) {\n if (baseClass === void 0) { baseClass = /** @class */ (function () {\n function class_1() {\n }\n return class_1;\n }()); }\n // Mixin classes cannot use private members and Symbol() cannot be used in 3P\n // for IE11.\n var unobserveMap = new WeakMap();\n return /** @class */ (function (_super) {\n __extends(MDCObserver, _super);\n function MDCObserver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCObserver.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n var unobserves = unobserveMap.get(_this) || [];\n var index = unobserves.indexOf(unobserve);\n if (index > -1) {\n unobserves.splice(index, 1);\n }\n };\n var unobserves = unobserveMap.get(this);\n if (!unobserves) {\n unobserves = [];\n unobserveMap.set(this, unobserves);\n }\n unobserves.push(unobserve);\n return unobserve;\n };\n MDCObserver.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n MDCObserver.prototype.unobserve = function () {\n var e_3, _a;\n // Iterate over a copy since unobserve() will remove themselves from the\n // array\n var unobserves = unobserveMap.get(this) || [];\n try {\n for (var _b = __values(__spreadArray([], __read(unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserver;\n }(baseClass));\n}\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the provided\n * `Observer`.\n */\nexport function observeProperty(target, property, observer) {\n var targetObservers = installObserver(target, property);\n var observers = targetObservers.getObservers(property);\n observers.push(observer);\n return function () {\n observers.splice(observers.indexOf(observer), 1);\n };\n}\n/**\n * A Map of all `TargetObservers` that have been installed.\n */\nvar allTargetObservers = new WeakMap();\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed), and replaces the given property with a getter and setter that\n * will respond to changes and call `TargetObservers`.\n *\n * Subsequent calls to `installObserver()` with the same target and property\n * will not override the property's previously installed getter/setter.\n *\n * @template T The observed target type.\n * @template K The observed property to create a getter/setter for.\n * @param target - The target to observe.\n * @param property - The property to create a getter/setter for, if needed.\n * @return The installed `TargetObservers` for the provided target.\n */\nfunction installObserver(target, property) {\n var observersMap = new Map();\n if (!allTargetObservers.has(target)) {\n allTargetObservers.set(target, {\n isEnabled: true,\n getObservers: function (key) {\n var observers = observersMap.get(key) || [];\n if (!observersMap.has(key)) {\n observersMap.set(key, observers);\n }\n return observers;\n },\n installedProperties: new Set()\n });\n }\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers.installedProperties.has(property)) {\n // The getter/setter has already been replaced for this property\n return targetObservers;\n }\n // Retrieve (or create if it's a plain property) the original descriptor from\n // the target...\n var descriptor = getDescriptor(target, property) || {\n configurable: true,\n enumerable: true,\n value: target[property],\n writable: true\n };\n // ...and create a copy that will be used for the observer.\n var observedDescriptor = __assign({}, descriptor);\n var descGet = descriptor.get, descSet = descriptor.set;\n if ('value' in descriptor) {\n // The descriptor is a simple value (not a getter/setter).\n // For our observer descriptor that we copied, delete the value/writable\n // properties, since they are incompatible with the get/set properties\n // for descriptors.\n delete observedDescriptor.value;\n delete observedDescriptor.writable;\n // Set up a simple getter...\n var value_1 = descriptor.value;\n descGet = function () { return value_1; };\n // ...and setter (if the original property was writable).\n if (descriptor.writable) {\n descSet = function (newValue) {\n value_1 = newValue;\n };\n }\n }\n if (descGet) {\n observedDescriptor.get = function () {\n // `this as T` needed for closure conformance\n return descGet.call(this);\n };\n }\n if (descSet) {\n observedDescriptor.set = function (newValue) {\n var e_4, _a;\n // `thus as T` needed for closure conformance\n var previous = descGet ? descGet.call(this) : newValue;\n descSet.call(this, newValue);\n if (targetObservers.isEnabled && (!descGet || newValue !== previous)) {\n try {\n for (var _b = __values(targetObservers.getObservers(property)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer(newValue, previous);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n };\n }\n targetObservers.installedProperties.add(property);\n Object.defineProperty(target, property, observedDescriptor);\n return targetObservers;\n}\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param target - The target to retrieve a descriptor from.\n * @param property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n * plain properties may not have a descriptor defined.\n */\nexport function getDescriptor(target, property) {\n var descriptorTarget = target;\n var descriptor;\n while (descriptorTarget) {\n descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n if (descriptor) {\n break;\n }\n // Walk up the instance's prototype chain in case the property is declared\n // on a superclass.\n descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n }\n return descriptor;\n}\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param target - The target to enable or disable observers for.\n * @param enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled(target, enabled) {\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers) {\n targetObservers.isEnabled = enabled;\n }\n}\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2021 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, __read, __spreadArray, __values } from \"tslib\";\nimport { MDCFoundation } from './foundation';\nimport { observeProperty, setObserversEnabled } from './observer';\nvar MDCObserverFoundation = /** @class */ (function (_super) {\n __extends(MDCObserverFoundation, _super);\n function MDCObserverFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n /** A set of cleanup functions to unobserve changes. */\n _this.unobserves = new Set();\n return _this;\n }\n MDCObserverFoundation.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.unobserve();\n };\n /**\n * Observe a target's properties for changes using the provided map of\n * property names and observer functions.\n *\n * @template T The target type.\n * @param target - The target to observe.\n * @param observers - An object whose keys are target properties and values\n * are observer functions that are called when the associated property\n * changes.\n * @return A cleanup function that can be called to unobserve the\n * target.\n */\n MDCObserverFoundation.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(this.observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n _this.unobserves.delete(unobserve);\n };\n this.unobserves.add(unobserve);\n return unobserve;\n };\n /**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current\n * and previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the\n * provided `Observer`.\n */\n MDCObserverFoundation.prototype.observeProperty = function (target, property, observer) {\n return observeProperty(target, property, observer);\n };\n /**\n * Enables or disables all observers for the provided target. Disabling\n * observers will prevent them from being called until they are re-enabled.\n *\n * @param target - The target to enable or disable observers for.\n * @param enabled - Whether or not observers should be called.\n */\n MDCObserverFoundation.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n /**\n * Clean up all observers and stop listening for property changes.\n */\n MDCObserverFoundation.prototype.unobserve = function () {\n var e_3, _a;\n try {\n // Iterate over a copy since unobserve() will remove themselves from the set\n for (var _b = __values(__spreadArray([], __read(this.unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserverFoundation;\n}(MDCFoundation));\nexport { MDCObserverFoundation };\n//# sourceMappingURL=observer-foundation.js.map","/**\n * @license\n * Copyright 2021 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 { MDCObserverFoundation } from '@material/base/observer-foundation';\nimport { CssClasses } from './constants';\n/**\n * `MDCSwitchFoundation` provides a state-only foundation for a switch\n * component.\n *\n * State observers and event handler entrypoints update a component's adapter's\n * state with the logic needed for switch to function.\n */\nvar MDCSwitchFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchFoundation, _super);\n function MDCSwitchFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchFoundation.prototype.init = function () {\n this.observe(this.adapter.state, {\n disabled: this.stopProcessingIfDisabled,\n processing: this.stopProcessingIfDisabled,\n });\n };\n /**\n * Event handler for switch click events. Clicking on a switch will toggle its\n * selected state.\n */\n MDCSwitchFoundation.prototype.handleClick = function () {\n if (this.adapter.state.disabled) {\n return;\n }\n this.adapter.state.selected = !this.adapter.state.selected;\n };\n MDCSwitchFoundation.prototype.stopProcessingIfDisabled = function () {\n if (this.adapter.state.disabled) {\n this.adapter.state.processing = false;\n }\n };\n return MDCSwitchFoundation;\n}(MDCObserverFoundation));\nexport { MDCSwitchFoundation };\n/**\n * `MDCSwitchRenderFoundation` provides a state and rendering foundation for a\n * switch component.\n *\n * State observers and event handler entrypoints update a component's\n * adapter's state with the logic needed for switch to function.\n *\n * In response to state changes, the rendering foundation uses the component's\n * render adapter to keep the component's DOM updated with the state.\n */\nvar MDCSwitchRenderFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchRenderFoundation, _super);\n function MDCSwitchRenderFoundation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchRenderFoundation.prototype.init = function () {\n _super.prototype.init.call(this);\n this.observe(this.adapter.state, {\n disabled: this.onDisabledChange,\n processing: this.onProcessingChange,\n selected: this.onSelectedChange,\n });\n };\n /**\n * Initializes the foundation from a server side rendered (SSR) component.\n * This will sync the adapter's state with the current state of the DOM.\n *\n * This method should be called after `init()`.\n */\n MDCSwitchRenderFoundation.prototype.initFromDOM = function () {\n // Turn off observers while setting state\n this.setObserversEnabled(this.adapter.state, false);\n this.adapter.state.selected = this.adapter.hasClass(CssClasses.SELECTED);\n // Ensure aria-checked is set if attribute is not present\n this.onSelectedChange();\n this.adapter.state.disabled = this.adapter.isDisabled();\n this.adapter.state.processing =\n this.adapter.hasClass(CssClasses.PROCESSING);\n // Re-observe state\n this.setObserversEnabled(this.adapter.state, true);\n this.stopProcessingIfDisabled();\n };\n MDCSwitchRenderFoundation.prototype.onDisabledChange = function () {\n this.adapter.setDisabled(this.adapter.state.disabled);\n };\n MDCSwitchRenderFoundation.prototype.onProcessingChange = function () {\n this.toggleClass(this.adapter.state.processing, CssClasses.PROCESSING);\n };\n MDCSwitchRenderFoundation.prototype.onSelectedChange = function () {\n this.adapter.setAriaChecked(String(this.adapter.state.selected));\n this.toggleClass(this.adapter.state.selected, CssClasses.SELECTED);\n this.toggleClass(!this.adapter.state.selected, CssClasses.UNSELECTED);\n };\n MDCSwitchRenderFoundation.prototype.toggleClass = function (addClass, className) {\n if (addClass) {\n this.adapter.addClass(className);\n }\n else {\n this.adapter.removeClass(className);\n }\n };\n return MDCSwitchRenderFoundation;\n}(MDCSwitchFoundation));\nexport { MDCSwitchRenderFoundation };\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2021 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 { MDCComponent } from '@material/base/component';\nimport { MDCRipple } from '@material/ripple/component';\nimport { MDCRippleFoundation } from '@material/ripple/foundation';\nimport { Selectors } from './constants';\nimport { MDCSwitchRenderFoundation } from './foundation';\n/**\n * `MDCSwitch` provides a component implementation of a Material Design switch.\n */\nvar MDCSwitch = /** @class */ (function (_super) {\n __extends(MDCSwitch, _super);\n function MDCSwitch(root, foundation) {\n var _this = _super.call(this, root, foundation) || this;\n _this.root = root;\n return _this;\n }\n /**\n * Creates a new `MDCSwitch` and attaches it to the given root element.\n * @param root The root to attach to.\n * @return the new component instance.\n */\n MDCSwitch.attachTo = function (root) {\n return new MDCSwitch(root);\n };\n MDCSwitch.prototype.initialize = function () {\n this.ripple = new MDCRipple(this.root, this.createRippleFoundation());\n };\n MDCSwitch.prototype.initialSyncWithDOM = function () {\n var rippleElement = this.root.querySelector(Selectors.RIPPLE);\n if (!rippleElement) {\n throw new Error(\"Switch \" + Selectors.RIPPLE + \" element is required.\");\n }\n this.rippleElement = rippleElement;\n this.root.addEventListener('click', this.foundation.handleClick);\n this.foundation.initFromDOM();\n };\n MDCSwitch.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.ripple.destroy();\n this.root.removeEventListener('click', this.foundation.handleClick);\n };\n MDCSwitch.prototype.getDefaultFoundation = function () {\n return new MDCSwitchRenderFoundation(this.createAdapter());\n };\n MDCSwitch.prototype.createAdapter = function () {\n var _this = this;\n return {\n addClass: function (className) {\n _this.root.classList.add(className);\n },\n hasClass: function (className) { return _this.root.classList.contains(className); },\n isDisabled: function () { return _this.root.disabled; },\n removeClass: function (className) {\n _this.root.classList.remove(className);\n },\n setAriaChecked: function (ariaChecked) {\n return _this.root.setAttribute('aria-checked', ariaChecked);\n },\n setDisabled: function (disabled) {\n _this.root.disabled = disabled;\n },\n state: this,\n };\n };\n MDCSwitch.prototype.createRippleFoundation = function () {\n return new MDCRippleFoundation(this.createRippleAdapter());\n };\n MDCSwitch.prototype.createRippleAdapter = function () {\n var _this = this;\n return __assign(__assign({}, MDCRipple.createAdapter(this)), { computeBoundingRect: function () { return _this.rippleElement.getBoundingClientRect(); }, isUnbounded: function () { return true; } });\n };\n return MDCSwitch;\n}(MDCComponent));\nexport { MDCSwitch };\n//# sourceMappingURL=component.js.map","@use '../../style/functions';\n@use '../../style/internal/shared_input-select-picker';\n@use '../../style/internal/lime-theme';\n@use '../../style/internal/lime-typography';\n\n@use '@material/switch/styles';\n\n$scale-factor: 0.8;\n\n:host(limel-switch) {\n isolation: isolate;\n\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n --mdc-switch-selected-icon-color: transparent;\n --mdc-switch-unselected-icon-color: transparent;\n\n --mdc-switch-disabled-selected-icon-opacity: 1;\n --mdc-switch-disabled-unselected-icon-opacity: 1;\n\n --mdc-switch-selected-icon-size: 0.75rem;\n --mdc-switch-unselected-icon-size: 0.75rem;\n\n --mdc-switch-track-height: 1.25rem;\n --mdc-switch-track-shape: var(--mdc-switch-track-height);\n\n --mdc-switch-unselected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n\n --mdc-switch-unselected-track-color: rgb(var(--contrast-700));\n --mdc-switch-unselected-focus-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-pressed-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-hover-track-color: rgb(var(--contrast-800));\n --mdc-switch-selected-focus-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-pressed-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-hover-track-color: var(--mdc-theme-primary);\n\n --mdc-switch-handle-elevation: var(--button-shadow-normal);\n --mdc-switch-disabled-track-opacity: 0.4;\n\n --mdc-switch-disabled-selected-handle-color: rgb(var(--contrast-1000));\n --mdc-switch-disabled-unselected-handle-color: rgb(var(--contrast-1000));\n}\n\n.mdc-switch {\n margin-right: functions.pxToRem(8);\n &:hover {\n --mdc-switch-handle-elevation: var(--button-shadow-hovered);\n }\n}\n\nlabel {\n @include lime-typography.typography(body2);\n color: var(--mdc-theme-on-surface);\n\n cursor: pointer;\n\n &.disabled {\n @include shared_input-select-picker.looks-disabled;\n }\n}\n\nlabel {\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-switch {\n &.mdc-switch--selected,\n &.mdc-switch.mdc-switch--unselected {\n .mdc-switch__handle {\n &:after,\n &:before {\n transform: scale($scale-factor);\n }\n }\n }\n .mdc-switch__shadow {\n transform: scale($scale-factor);\n }\n}\n\n@import './partial-styles/_readonly.scss';\n@import './partial-styles/_helper-text.scss';\n","import { MDCSwitch } from '@material/switch';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from 'src/util/make-enter-clickable';\n\n/**\n * The Switch component is a fundamental element in UI design that serves as a toggle switch\n * to control the state of a specific setting or option in an application or website.\n * The two distinct positions of the Switch are visually indicative of the two states:\n * ON and OFF; making it easy for users to understand the current state of the controlled feature.\n *\n * The Switch component is widely used in user interfaces to enable users to\n * quickly and intuitively change binary settings.\n *\n * :::important\n * Checkboxes are sometimes used interchangeably with switches in user interfaces.\n * But there is an important difference between the two! Please read our guidelines about\n * [Switch vs. Checkbox](/#/DesignGuidelines/switch-vs-checkbox.md/).\n *\n * @exampleComponent limel-example-switch\n * @exampleComponent limel-example-switch-helper-text\n */\n@Component({\n tag: 'limel-switch',\n shadow: true,\n styleUrl: 'switch.scss',\n})\nexport class Switch {\n /**\n * Label to display next to the switch\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Disables the switch when `true`,\n * and visually shows that the switch is editable but disabled.\n * This tells the users that if certain requirements are met,\n * the switch may become interactable.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Disables the switch when `true`. This visualizes the switch slightly differently.\n * But shows no visual sign indicating that the switch 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 is invalid.\n */\n @Prop({ reflect: true })\n public invalid: boolean;\n\n /**\n * The value of the switch\n */\n @Prop({ reflect: true })\n public value = false;\n\n /**\n * Optional helper text to display below the switch\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Emitted when the value has changed\n */\n @Event()\n private change: EventEmitter<boolean>;\n\n @Element()\n private host: HTMLLimelSwitchElement;\n private helperTextId: string = createRandomString();\n\n @State()\n private fieldId = createRandomString();\n\n private mdcSwitch: MDCSwitch;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector(\n '.mdc-switch',\n ) as HTMLButtonElement;\n if (!element) {\n return;\n }\n\n this.mdcSwitch = new MDCSwitch(element);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n this.mdcSwitch?.destroy();\n }\n\n public render() {\n return (\n <Host>\n <button\n id={this.fieldId}\n class={{\n 'mdc-switch': true,\n 'lime-switch--readonly': this.readonly,\n 'mdc-switch--unselected': !this.value,\n 'mdc-switch--selected': this.value,\n }}\n type=\"button\"\n role=\"switch\"\n aria-checked={this.value}\n disabled={this.disabled || this.readonly}\n onClick={this.handleClick}\n aria-controls={this.helperTextId}\n >\n <div class=\"mdc-switch__track\" />\n <div class=\"mdc-switch__handle-track\">\n <div class=\"mdc-switch__handle\">\n <div class=\"mdc-switch__shadow\">\n <div class=\"mdc-elevation-overlay\"></div>\n </div>\n <div class=\"mdc-switch__ripple\"></div>\n <div class=\"mdc-switch__icons\">\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--on\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" />\n </svg>\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--off\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M20 13H4v-2h16v2z\" />\n </svg>\n </div>\n </div>\n </div>\n </button>\n <label\n class={`${\n this.disabled || this.readonly ? 'disabled' : ''\n }`}\n htmlFor={this.fieldId}\n >\n {this.label}\n </label>\n {this.renderHelperLine()}\n </Host>\n );\n }\n\n @Watch('value')\n protected valueWatcher(newValue: boolean) {\n if (!this.mdcSwitch) {\n return;\n }\n\n this.mdcSwitch.selected = newValue;\n }\n\n private renderHelperLine = () => {\n if (!this.hasHelperText()) {\n return;\n }\n\n return (\n <limel-helper-line\n helperTextId={this.helperTextId}\n helperText={this.helperText}\n />\n );\n };\n\n private hasHelperText = () => {\n return this.helperText !== null && this.helperText !== undefined;\n };\n\n private handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.change.emit(!this.value);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAyBO,IAAIA,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ATE","BACKGROUND","CHECKED","CHECKMARK","CHECKMARK_PATH","DISABLED","INDETERMINATE","MIXEDMARK","NATIVE_CONTROL","ROOT","SELECTED","UPGRADED","strings","ARIA_CHECKED_ATTR","ARIA_CHECKED_INDETERMINATE_VALUE","DATA_INDETERMINATE_ATTR","NATIVE_CONTROL_SELECTOR","TRANSITION_STATE_CHECKED","TRANSITION_STATE_INDETERMINATE","TRANSITION_STATE_INIT","TRANSITION_STATE_UNCHECKED","numbers","ANIM_END_LATCH_MS","MDCCheckboxFoundation","_super","__extends","adapter","_this","call","this","__assign","defaultAdapter","currentCheckState","currentAnimationClass","animEndLatchTimer","enableAnimationEndHandler","Object","defineProperty","get","enumerable","configurable","addClass","undefined","forceLayout","hasNativeControl","isAttachedToDOM","isChecked","isIndeterminate","removeClass","removeNativeControlAttr","setNativeControlAttr","setNativeControlDisabled","prototype","init","determineCheckState","updateAriaChecked","destroy","clearTimeout","setDisabled","disabled","handleAnimationEnd","setTimeout","handleChange","transitionCheckState","oldState","newState","length","getTransitionAnimationClass","_a","MDCFoundation","CB_PROTO_PROPS","MDCCheckbox","apply","arguments","rippleSurface","createRipple","attachTo","root","getNativeControl","checked","set","indeterminate","foundation","value","initialize","getAttribute","removeAttribute","initialSyncWithDOM","addEventListener","listen","getCorrectEventName","window","installPropertyChangeHooks","removeEventListener","unlisten","uninstallPropertyChangeHooks","getDefaultFoundation","className","classList","add","offsetWidth","Boolean","parentNode","remove","attr","setAttribute","MDCRipple","createAdapter","deregisterInteractionHandler","evtType","handler","applyPassive","isSurfaceActive","matches","isUnbounded","registerInteractionHandler","MDCRippleFoundation","e_1","nativeCb","cbProto","getPrototypeOf","_loop_1","controlState","desc","getOwnPropertyDescriptor","validDescriptor","nativeGetter","nativeCbDesc","state","CB_PROTO_PROPS_1","__values","CB_PROTO_PROPS_1_1","next","done","state_1","e_1_1","error","return","e_2","CB_PROTO_PROPS_2","CB_PROTO_PROPS_2_1","e_2_1","el","querySelector","Error","MDCComponent","inputPropDesc","LABEL_SELECTOR","MDCFormFieldFoundation","click","handleClick","activateInputRipple","deactivateInputRipple","requestAnimationFrame","MDCFormField","labelEl","input","ripple","activate","deactivate","checkboxCss","Checkbox","id","createRandomString","helperTextId","isInvalid","invalid","required","modified","element","limelCheckbox","shadowRoot","formField","mdcCheckbox","getCheckboxElement","onChange","event","stopPropagation","change","emit","handleCheckedChange","newValue","handleIndeterminateChange","connectedCallback","componentDidLoad","disconnectedCallback","_b","checkboxElement","render","h","CheckboxTemplate","readonly","label","helperText"],"sources":["./node_modules/@material/checkbox/constants.js","./node_modules/@material/checkbox/foundation.js","./node_modules/@material/checkbox/component.js","./node_modules/@material/form-field/constants.js","./node_modules/@material/form-field/foundation.js","./node_modules/@material/form-field/component.js","./src/components/checkbox/checkbox.scss?tag=limel-checkbox&encapsulation=shadow","./src/components/checkbox/checkbox.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2016 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 */\nexport var cssClasses = {\n ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate',\n ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked',\n ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked',\n ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked',\n ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked',\n ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate',\n BACKGROUND: 'mdc-checkbox__background',\n CHECKED: 'mdc-checkbox--checked',\n CHECKMARK: 'mdc-checkbox__checkmark',\n CHECKMARK_PATH: 'mdc-checkbox__checkmark-path',\n DISABLED: 'mdc-checkbox--disabled',\n INDETERMINATE: 'mdc-checkbox--indeterminate',\n MIXEDMARK: 'mdc-checkbox__mixedmark',\n NATIVE_CONTROL: 'mdc-checkbox__native-control',\n ROOT: 'mdc-checkbox',\n SELECTED: 'mdc-checkbox--selected',\n UPGRADED: 'mdc-checkbox--upgraded',\n};\nexport var strings = {\n ARIA_CHECKED_ATTR: 'aria-checked',\n ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed',\n DATA_INDETERMINATE_ATTR: 'data-indeterminate',\n NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control',\n TRANSITION_STATE_CHECKED: 'checked',\n TRANSITION_STATE_INDETERMINATE: 'indeterminate',\n TRANSITION_STATE_INIT: 'init',\n TRANSITION_STATE_UNCHECKED: 'unchecked',\n};\nexport var numbers = {\n ANIM_END_LATCH_MS: 250,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 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 MDCCheckboxFoundation = /** @class */ (function (_super) {\n __extends(MDCCheckboxFoundation, _super);\n function MDCCheckboxFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCCheckboxFoundation.defaultAdapter), adapter)) || this;\n _this.currentCheckState = strings.TRANSITION_STATE_INIT;\n _this.currentAnimationClass = '';\n _this.animEndLatchTimer = 0;\n _this.enableAnimationEndHandler = false;\n return _this;\n }\n Object.defineProperty(MDCCheckboxFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n forceLayout: function () { return undefined; },\n hasNativeControl: function () { return false; },\n isAttachedToDOM: function () { return false; },\n isChecked: function () { return false; },\n isIndeterminate: function () { return false; },\n removeClass: function () { return undefined; },\n removeNativeControlAttr: function () { return undefined; },\n setNativeControlAttr: function () { return undefined; },\n setNativeControlDisabled: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCCheckboxFoundation.prototype.init = function () {\n this.currentCheckState = this.determineCheckState();\n this.updateAriaChecked();\n this.adapter.addClass(cssClasses.UPGRADED);\n };\n MDCCheckboxFoundation.prototype.destroy = function () {\n clearTimeout(this.animEndLatchTimer);\n };\n MDCCheckboxFoundation.prototype.setDisabled = function (disabled) {\n this.adapter.setNativeControlDisabled(disabled);\n if (disabled) {\n this.adapter.addClass(cssClasses.DISABLED);\n }\n else {\n this.adapter.removeClass(cssClasses.DISABLED);\n }\n };\n /**\n * Handles the animationend event for the checkbox\n */\n MDCCheckboxFoundation.prototype.handleAnimationEnd = function () {\n var _this = this;\n if (!this.enableAnimationEndHandler) {\n return;\n }\n clearTimeout(this.animEndLatchTimer);\n this.animEndLatchTimer = setTimeout(function () {\n _this.adapter.removeClass(_this.currentAnimationClass);\n _this.enableAnimationEndHandler = false;\n }, numbers.ANIM_END_LATCH_MS);\n };\n /**\n * Handles the change event for the checkbox\n */\n MDCCheckboxFoundation.prototype.handleChange = function () {\n this.transitionCheckState();\n };\n MDCCheckboxFoundation.prototype.transitionCheckState = function () {\n if (!this.adapter.hasNativeControl()) {\n return;\n }\n var oldState = this.currentCheckState;\n var newState = this.determineCheckState();\n if (oldState === newState) {\n return;\n }\n this.updateAriaChecked();\n var TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n var SELECTED = cssClasses.SELECTED;\n if (newState === TRANSITION_STATE_UNCHECKED) {\n this.adapter.removeClass(SELECTED);\n }\n else {\n this.adapter.addClass(SELECTED);\n }\n // Check to ensure that there isn't a previously existing animation class, in case for example\n // the user interacted with the checkbox before the animation was finished.\n if (this.currentAnimationClass.length > 0) {\n clearTimeout(this.animEndLatchTimer);\n this.adapter.forceLayout();\n this.adapter.removeClass(this.currentAnimationClass);\n }\n this.currentAnimationClass =\n this.getTransitionAnimationClass(oldState, newState);\n this.currentCheckState = newState;\n // Check for parentNode so that animations are only run when the element is attached\n // to the DOM.\n if (this.adapter.isAttachedToDOM() &&\n this.currentAnimationClass.length > 0) {\n this.adapter.addClass(this.currentAnimationClass);\n this.enableAnimationEndHandler = true;\n }\n };\n MDCCheckboxFoundation.prototype.determineCheckState = function () {\n var TRANSITION_STATE_INDETERMINATE = strings.TRANSITION_STATE_INDETERMINATE, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n if (this.adapter.isIndeterminate()) {\n return TRANSITION_STATE_INDETERMINATE;\n }\n return this.adapter.isChecked() ? TRANSITION_STATE_CHECKED :\n TRANSITION_STATE_UNCHECKED;\n };\n MDCCheckboxFoundation.prototype.getTransitionAnimationClass = function (oldState, newState) {\n var TRANSITION_STATE_INIT = strings.TRANSITION_STATE_INIT, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n var _a = MDCCheckboxFoundation.cssClasses, ANIM_UNCHECKED_CHECKED = _a.ANIM_UNCHECKED_CHECKED, ANIM_UNCHECKED_INDETERMINATE = _a.ANIM_UNCHECKED_INDETERMINATE, ANIM_CHECKED_UNCHECKED = _a.ANIM_CHECKED_UNCHECKED, ANIM_CHECKED_INDETERMINATE = _a.ANIM_CHECKED_INDETERMINATE, ANIM_INDETERMINATE_CHECKED = _a.ANIM_INDETERMINATE_CHECKED, ANIM_INDETERMINATE_UNCHECKED = _a.ANIM_INDETERMINATE_UNCHECKED;\n switch (oldState) {\n case TRANSITION_STATE_INIT:\n if (newState === TRANSITION_STATE_UNCHECKED) {\n return '';\n }\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n case TRANSITION_STATE_UNCHECKED:\n return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;\n case TRANSITION_STATE_CHECKED:\n return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;\n default: // TRANSITION_STATE_INDETERMINATE\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n }\n };\n MDCCheckboxFoundation.prototype.updateAriaChecked = function () {\n // Ensure aria-checked is set to mixed if checkbox is in indeterminate state.\n if (this.adapter.isIndeterminate()) {\n this.adapter.setNativeControlAttr(strings.ARIA_CHECKED_ATTR, strings.ARIA_CHECKED_INDETERMINATE_VALUE);\n }\n else {\n // The on/off state does not need to keep track of aria-checked, since\n // the screenreader uses the checked property on the checkbox element.\n this.adapter.removeNativeControlAttr(strings.ARIA_CHECKED_ATTR);\n }\n };\n return MDCCheckboxFoundation;\n}(MDCFoundation));\nexport { MDCCheckboxFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCheckboxFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 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, __values } from \"tslib\";\nimport { getCorrectEventName } from '@material/animation/util';\nimport { MDCComponent } from '@material/base/component';\nimport { applyPassive } from '@material/dom/events';\nimport { matches } from '@material/dom/ponyfill';\nimport { MDCRipple } from '@material/ripple/component';\nimport { MDCRippleFoundation } from '@material/ripple/foundation';\nimport { strings } from './constants';\nimport { MDCCheckboxFoundation } from './foundation';\nvar CB_PROTO_PROPS = ['checked', 'indeterminate'];\nvar MDCCheckbox = /** @class */ (function (_super) {\n __extends(MDCCheckbox, _super);\n function MDCCheckbox() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.rippleSurface = _this.createRipple();\n return _this;\n }\n MDCCheckbox.attachTo = function (root) {\n return new MDCCheckbox(root);\n };\n Object.defineProperty(MDCCheckbox.prototype, \"ripple\", {\n get: function () {\n return this.rippleSurface;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"checked\", {\n get: function () {\n return this.getNativeControl().checked;\n },\n set: function (checked) {\n this.getNativeControl().checked = checked;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"indeterminate\", {\n get: function () {\n return this.getNativeControl().indeterminate;\n },\n set: function (indeterminate) {\n this.getNativeControl().indeterminate = indeterminate;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"disabled\", {\n get: function () {\n return this.getNativeControl().disabled;\n },\n set: function (disabled) {\n this.foundation.setDisabled(disabled);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"value\", {\n get: function () {\n return this.getNativeControl().value;\n },\n set: function (value) {\n this.getNativeControl().value = value;\n },\n enumerable: false,\n configurable: true\n });\n MDCCheckbox.prototype.initialize = function () {\n var DATA_INDETERMINATE_ATTR = strings.DATA_INDETERMINATE_ATTR;\n this.getNativeControl().indeterminate =\n this.getNativeControl().getAttribute(DATA_INDETERMINATE_ATTR) ===\n 'true';\n this.getNativeControl().removeAttribute(DATA_INDETERMINATE_ATTR);\n };\n MDCCheckbox.prototype.initialSyncWithDOM = function () {\n var _this = this;\n this.handleChange = function () {\n _this.foundation.handleChange();\n };\n this.handleAnimationEnd = function () {\n _this.foundation.handleAnimationEnd();\n };\n this.getNativeControl().addEventListener('change', this.handleChange);\n this.listen(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.installPropertyChangeHooks();\n };\n MDCCheckbox.prototype.destroy = function () {\n this.rippleSurface.destroy();\n this.getNativeControl().removeEventListener('change', this.handleChange);\n this.unlisten(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.uninstallPropertyChangeHooks();\n _super.prototype.destroy.call(this);\n };\n MDCCheckbox.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) { return _this.root.classList.add(className); },\n forceLayout: function () { return _this.root.offsetWidth; },\n hasNativeControl: function () { return !!_this.getNativeControl(); },\n isAttachedToDOM: function () { return Boolean(_this.root.parentNode); },\n isChecked: function () { return _this.checked; },\n isIndeterminate: function () { return _this.indeterminate; },\n removeClass: function (className) {\n _this.root.classList.remove(className);\n },\n removeNativeControlAttr: function (attr) {\n _this.getNativeControl().removeAttribute(attr);\n },\n setNativeControlAttr: function (attr, value) {\n _this.getNativeControl().setAttribute(attr, value);\n },\n setNativeControlDisabled: function (disabled) {\n _this.getNativeControl().disabled = disabled;\n },\n };\n return new MDCCheckboxFoundation(adapter);\n };\n MDCCheckbox.prototype.createRipple = 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 = __assign(__assign({}, MDCRipple.createAdapter(this)), { deregisterInteractionHandler: function (evtType, handler) {\n _this.getNativeControl().removeEventListener(evtType, handler, applyPassive());\n }, isSurfaceActive: function () { return matches(_this.getNativeControl(), ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) {\n _this.getNativeControl().addEventListener(evtType, handler, applyPassive());\n } });\n return new MDCRipple(this.root, new MDCRippleFoundation(adapter));\n };\n MDCCheckbox.prototype.installPropertyChangeHooks = function () {\n var e_1, _a;\n var _this = this;\n var nativeCb = this.getNativeControl();\n var cbProto = Object.getPrototypeOf(nativeCb);\n var _loop_1 = function (controlState) {\n var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!validDescriptor(desc)) {\n return { value: void 0 };\n }\n // Type cast is needed for compatibility with Closure Compiler.\n var nativeGetter = desc.get;\n var nativeCbDesc = {\n configurable: desc.configurable,\n enumerable: desc.enumerable,\n get: nativeGetter,\n set: function (state) {\n desc.set.call(nativeCb, state);\n _this.foundation.handleChange();\n },\n };\n Object.defineProperty(nativeCb, controlState, nativeCbDesc);\n };\n try {\n for (var CB_PROTO_PROPS_1 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next(); !CB_PROTO_PROPS_1_1.done; CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next()) {\n var controlState = CB_PROTO_PROPS_1_1.value;\n var state_1 = _loop_1(controlState);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (CB_PROTO_PROPS_1_1 && !CB_PROTO_PROPS_1_1.done && (_a = CB_PROTO_PROPS_1.return)) _a.call(CB_PROTO_PROPS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n MDCCheckbox.prototype.uninstallPropertyChangeHooks = function () {\n var e_2, _a;\n var nativeCb = this.getNativeControl();\n var cbProto = Object.getPrototypeOf(nativeCb);\n try {\n for (var CB_PROTO_PROPS_2 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next(); !CB_PROTO_PROPS_2_1.done; CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next()) {\n var controlState = CB_PROTO_PROPS_2_1.value;\n var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n if (!validDescriptor(desc)) {\n return;\n }\n Object.defineProperty(nativeCb, controlState, desc);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (CB_PROTO_PROPS_2_1 && !CB_PROTO_PROPS_2_1.done && (_a = CB_PROTO_PROPS_2.return)) _a.call(CB_PROTO_PROPS_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n MDCCheckbox.prototype.getNativeControl = function () {\n var NATIVE_CONTROL_SELECTOR = strings.NATIVE_CONTROL_SELECTOR;\n var el = this.root.querySelector(NATIVE_CONTROL_SELECTOR);\n if (!el) {\n throw new Error(\"Checkbox component requires a \" + NATIVE_CONTROL_SELECTOR + \" element\");\n }\n return el;\n };\n return MDCCheckbox;\n}(MDCComponent));\nexport { MDCCheckbox };\nfunction validDescriptor(inputPropDesc) {\n return !!inputPropDesc && typeof inputPropDesc.set === 'function';\n}\n//# sourceMappingURL=component.js.map","/**\n * @license\n * Copyright 2017 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 */\nexport var cssClasses = {\n ROOT: 'mdc-form-field',\n};\nexport var strings = {\n LABEL_SELECTOR: '.mdc-form-field > label',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 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 MDCFormFieldFoundation = /** @class */ (function (_super) {\n __extends(MDCFormFieldFoundation, _super);\n function MDCFormFieldFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this;\n _this.click = function () {\n _this.handleClick();\n };\n return _this;\n }\n Object.defineProperty(MDCFormFieldFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFormFieldFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFormFieldFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n activateInputRipple: function () { return undefined; },\n deactivateInputRipple: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n registerInteractionHandler: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCFormFieldFoundation.prototype.init = function () {\n this.adapter.registerInteractionHandler('click', this.click);\n };\n MDCFormFieldFoundation.prototype.destroy = function () {\n this.adapter.deregisterInteractionHandler('click', this.click);\n };\n MDCFormFieldFoundation.prototype.handleClick = function () {\n var _this = this;\n this.adapter.activateInputRipple();\n requestAnimationFrame(function () {\n _this.adapter.deactivateInputRipple();\n });\n };\n return MDCFormFieldFoundation;\n}(MDCFoundation));\nexport { MDCFormFieldFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFormFieldFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2017 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 { MDCFormFieldFoundation } from './foundation';\nvar MDCFormField = /** @class */ (function (_super) {\n __extends(MDCFormField, _super);\n function MDCFormField() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCFormField.attachTo = function (root) {\n return new MDCFormField(root);\n };\n MDCFormField.prototype.labelEl = function () {\n var LABEL_SELECTOR = MDCFormFieldFoundation.strings.LABEL_SELECTOR;\n return this.root.querySelector(LABEL_SELECTOR);\n };\n MDCFormField.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 activateInputRipple: function () {\n if (_this.input && _this.input.ripple) {\n _this.input.ripple.activate();\n }\n },\n deactivateInputRipple: function () {\n if (_this.input && _this.input.ripple) {\n _this.input.ripple.deactivate();\n }\n },\n deregisterInteractionHandler: function (evtType, handler) {\n var labelEl = _this.labelEl();\n if (labelEl) {\n labelEl.removeEventListener(evtType, handler);\n }\n },\n registerInteractionHandler: function (evtType, handler) {\n var labelEl = _this.labelEl();\n if (labelEl) {\n labelEl.addEventListener(evtType, handler);\n }\n },\n };\n return new MDCFormFieldFoundation(adapter);\n };\n return MDCFormField;\n}(MDCComponent));\nexport { MDCFormField };\n//# sourceMappingURL=component.js.map","@use '../../style/internal/lime-theme';\n@use '@material/checkbox';\n@use '@material/form-field';\n\n/**\n* @prop --checkbox-unchecked-border-color: Affects the border color of the default state of the checkbox (when it is not checked). Defaults to `--contrast-900`.\n*/\n\n@mixin custom-checkbox-styles {\n // This is used in other components too, such as `limel-list`\n --mdc-checkbox-checked-color: var(--mdc-theme-primary);\n --mdc-checkbox-unchecked-color: var(\n --checkbox-unchecked-border-color,\n rgb(var(--contrast-900))\n );\n --lime-checkbox-unchecked-color: rgb(var(--contrast-300));\n}\n\n:host(limel-checkbox) {\n @include custom-checkbox-styles;\n}\n\n@include checkbox.core-styles;\n@include form-field.core-styles;\n\n.mdc-form-field {\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-form-field {\n display: flex;\n\n .mdc-checkbox {\n .mdc-checkbox__native-control {\n &[disabled],\n &:enabled {\n &:not(:checked):not(:indeterminate) {\n ~ .mdc-checkbox__background {\n background-color: var(--lime-checkbox-unchecked-color);\n }\n }\n }\n }\n\n &.mdc-checkbox--invalid {\n .mdc-checkbox__native-control:enabled:not(:checked):not(\n :indeterminate\n )\n ~ .mdc-checkbox__background {\n border-color: var(--lime-error-text-color);\n }\n }\n .mdc-checkbox__native-control {\n &:focus-visible {\n + .mdc-checkbox__background {\n &:after {\n content: '';\n display: block;\n position: absolute;\n inset: -0.25rem;\n border-radius: 0.25rem;\n box-shadow: var(--shadow-depth-8-focused);\n }\n }\n }\n }\n }\n .mdc-checkbox--disabled {\n opacity: 0.5;\n }\n\n label {\n cursor: pointer;\n line-height: normal;\n padding-left: 0;\n\n &.mdc-checkbox--required::after {\n margin-left: 0.0625rem;\n content: '*';\n }\n\n &.mdc-checkbox--invalid {\n color: var(--lime-error-text-color);\n }\n }\n}\n\n@import './partial-styles/_helper-text.scss';\n@import './partial-styles/_readonly.scss';\n","import { MDCCheckbox, cssClasses } from '@material/checkbox';\nimport { MDCFormField } from '@material/form-field';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport { CheckboxTemplate } from './checkbox.template';\n\n/**\n * The Checkbox component is a classic and essential element in UI design that allows\n * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to\n * select one or more items from a list of choices.\n *\n * ## States of a Checkbox\n * When a user clicks or taps on the box, it toggles between two states:\n * Checked and Unchecked.\n *\n * However, a Checkbox can visualize a third state called the \"Indeterminate\" state.\n * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.\n *\n * The Indeterminate state is typically used when dealing with checkbox groups\n * that have hierarchical relationships or when the group contains sub-items.\n * This state is used to indicate that that some, but not all, of the items in a group are selected.\n *\n * <limel-example-switch-vs-checkbox />\n *\n * @exampleComponent limel-example-checkbox\n * @exampleComponent limel-example-checkbox-helper-text\n */\n@Component({\n tag: 'limel-checkbox',\n shadow: true,\n styleUrl: 'checkbox.scss',\n})\nexport class Checkbox {\n /**\n * Disables the checkbox when `true`. Works exactly the same as `readonly`.\n * If either property is `true`, the checkbox will be disabled.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Disables the checkbox when `true`. This visualizes the checkbox slightly differently.\n * But shows no visual sign indicating that the checkbox 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 is invalid.\n */\n @Prop({ reflect: true })\n public invalid: boolean;\n\n /**\n * The checkbox label.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Optional helper text to display below the checkbox\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * The value of the checkbox. Set to `true` to make the checkbox checked.\n */\n @Prop({ reflect: true })\n public checked = false;\n\n /**\n * Enables indeterminate state. Set to `true` to signal indeterminate check.\n */\n @Prop({ reflect: true })\n public indeterminate = false;\n\n /**\n * Set to `true` to indicate that the checkbox must be checked.\n */\n @Prop({ reflect: true })\n public required: boolean = false;\n\n @State()\n private modified = false;\n\n /**\n * Emitted when the input value is changed.\n */\n @Event()\n private change: EventEmitter<boolean>;\n\n @Element()\n private limelCheckbox: HTMLLimelCheckboxElement;\n\n private formField: MDCFormField;\n private mdcCheckbox: MDCCheckbox;\n private id: string = createRandomString();\n private helperTextId: string = createRandomString();\n\n @Watch('checked')\n protected handleCheckedChange(newValue: boolean) {\n this.mdcCheckbox.checked = newValue;\n }\n\n @Watch('indeterminate')\n protected handleIndeterminateChange(newValue: boolean) {\n this.mdcCheckbox.checked = this.checked;\n this.mdcCheckbox.indeterminate = newValue;\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n public disconnectedCallback() {\n this.mdcCheckbox?.destroy();\n this.formField?.destroy();\n\n const checkboxElement = this.getCheckboxElement();\n if (checkboxElement) {\n checkboxElement.classList.remove(\n cssClasses.ANIM_CHECKED_INDETERMINATE,\n cssClasses.ANIM_CHECKED_UNCHECKED,\n cssClasses.ANIM_INDETERMINATE_CHECKED,\n cssClasses.ANIM_INDETERMINATE_UNCHECKED,\n cssClasses.ANIM_UNCHECKED_CHECKED,\n cssClasses.ANIM_UNCHECKED_INDETERMINATE,\n );\n }\n }\n\n public render() {\n return (\n <CheckboxTemplate\n disabled={this.disabled || this.readonly}\n label={this.label}\n helperText={this.helperText}\n helperTextId={this.helperTextId}\n checked={this.checked || this.indeterminate}\n indeterminate={this.indeterminate}\n required={this.required}\n readonly={this.readonly}\n invalid={this.isInvalid()}\n onChange={this.onChange}\n id={this.id}\n />\n );\n }\n\n private isInvalid = () => {\n if (this.invalid) {\n return true;\n }\n\n if (this.required && this.modified && !this.checked) {\n return true;\n }\n };\n\n private initialize = () => {\n const element =\n this.limelCheckbox.shadowRoot.querySelector('.mdc-form-field');\n if (!element) {\n return;\n }\n\n this.formField = new MDCFormField(element);\n this.mdcCheckbox = new MDCCheckbox(this.getCheckboxElement());\n this.formField.input = this.mdcCheckbox;\n };\n\n private getCheckboxElement = () => {\n return this.limelCheckbox.shadowRoot.querySelector('.mdc-checkbox');\n };\n\n private onChange = (event: Event) => {\n event.stopPropagation();\n this.change.emit(this.mdcCheckbox.checked);\n this.modified = true;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAsBO,IAAIA,EAAa,CACpBC,2BAA4B,2CAC5BC,uBAAwB,uCACxBC,2BAA4B,2CAC5BC,6BAA8B,6CAC9BC,uBAAwB,uCACxBC,6BAA8B,6CAC9BC,WAAY,2BACZC,QAAS,wBACTC,UAAW,0BACXC,eAAgB,+BAChBC,SAAU,yBACVC,cAAe,8BACfC,UAAW,0BACXC,eAAgB,+BAChBC,KAAM,eACNC,SAAU,yBACVC,SAAU,0BAEP,IAAIC,EAAU,CACjBC,kBAAmB,eACnBC,iCAAkC,QAClCC,wBAAyB,qBACzBC,wBAAyB,gCACzBC,yBAA0B,UAC1BC,+BAAgC,gBAChCC,sBAAuB,OACvBC,2BAA4B,aAEzB,IAAIC,EAAU,CACjBC,kBAAmB;;;;;;;;;;;;;;;;;;;;;;GC3BvB,IAAIC,EAAuC,SAAUC,GACjDC,EAAUF,EAAuBC,GACjC,SAASD,EAAsBG,GAC3B,IAAIC,EAAQH,EAAOI,KAAKC,KAAMC,EAASA,EAAS,GAAIP,EAAsBQ,gBAAiBL,KAAaG,KACxGF,EAAMK,kBAAoBpB,EAAQO,sBAClCQ,EAAMM,sBAAwB,GAC9BN,EAAMO,kBAAoB,EAC1BP,EAAMQ,0BAA4B,MAClC,OAAOR,CACf,CACIS,OAAOC,eAAed,EAAuB,aAAc,CACvDe,IAAK,WACD,OAAO5C,CACnB,EACQ6C,WAAY,MACZC,aAAc,OAElBJ,OAAOC,eAAed,EAAuB,UAAW,CACpDe,IAAK,WACD,OAAO1B,CACnB,EACQ2B,WAAY,MACZC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,GAAIa,EAAiB,CACjBA,EAAgBzF,UAAUK,OACtB7G,EAAWC,2BACXD,EAAWE,uBACXF,EAAWG,2BACXH,EAAWI,6BACXJ,EAAWK,uBACXL,EAAWM,6B,EAKhB4L,SACH,OACIC,EAACC,EAAgB,CACbnI,SAAU9B,KAAK8B,UAAY9B,KAAKkK,SAChCC,MAAOnK,KAAKmK,MACZC,WAAYpK,KAAKoK,WACjB7B,aAAcvI,KAAKuI,aACnBrF,QAASlD,KAAKkD,SAAWlD,KAAKoD,cAC9BA,cAAepD,KAAKoD,cACpBsF,SAAU1I,KAAK0I,SACfwB,SAAUlK,KAAKkK,SACfzB,QAASzI,KAAKwI,YACdU,SAAUlJ,KAAKkJ,SACfb,GAAIrI,KAAKqI,I"}
1
+ {"version":3,"names":["cssClasses","ANIM_CHECKED_INDETERMINATE","ANIM_CHECKED_UNCHECKED","ANIM_INDETERMINATE_CHECKED","ANIM_INDETERMINATE_UNCHECKED","ANIM_UNCHECKED_CHECKED","ANIM_UNCHECKED_INDETERMINATE","BACKGROUND","CHECKED","CHECKMARK","CHECKMARK_PATH","DISABLED","INDETERMINATE","MIXEDMARK","NATIVE_CONTROL","ROOT","SELECTED","UPGRADED","strings","ARIA_CHECKED_ATTR","ARIA_CHECKED_INDETERMINATE_VALUE","DATA_INDETERMINATE_ATTR","NATIVE_CONTROL_SELECTOR","TRANSITION_STATE_CHECKED","TRANSITION_STATE_INDETERMINATE","TRANSITION_STATE_INIT","TRANSITION_STATE_UNCHECKED","numbers","ANIM_END_LATCH_MS","MDCCheckboxFoundation","_super","__extends","adapter","_this","call","this","__assign","defaultAdapter","currentCheckState","currentAnimationClass","animEndLatchTimer","enableAnimationEndHandler","Object","defineProperty","get","enumerable","configurable","addClass","undefined","forceLayout","hasNativeControl","isAttachedToDOM","isChecked","isIndeterminate","removeClass","removeNativeControlAttr","setNativeControlAttr","setNativeControlDisabled","prototype","init","determineCheckState","updateAriaChecked","destroy","clearTimeout","setDisabled","disabled","handleAnimationEnd","setTimeout","handleChange","transitionCheckState","oldState","newState","length","getTransitionAnimationClass","_a","MDCFoundation","CB_PROTO_PROPS","MDCCheckbox","apply","arguments","rippleSurface","createRipple","attachTo","root","getNativeControl","checked","set","indeterminate","foundation","value","initialize","getAttribute","removeAttribute","initialSyncWithDOM","addEventListener","listen","getCorrectEventName","window","installPropertyChangeHooks","removeEventListener","unlisten","uninstallPropertyChangeHooks","getDefaultFoundation","className","classList","add","offsetWidth","Boolean","parentNode","remove","attr","setAttribute","MDCRipple","createAdapter","deregisterInteractionHandler","evtType","handler","applyPassive","isSurfaceActive","matches","isUnbounded","registerInteractionHandler","MDCRippleFoundation","e_1","nativeCb","cbProto","getPrototypeOf","_loop_1","controlState","desc","getOwnPropertyDescriptor","validDescriptor","nativeGetter","nativeCbDesc","state","CB_PROTO_PROPS_1","__values","CB_PROTO_PROPS_1_1","next","done","state_1","e_1_1","error","return","e_2","CB_PROTO_PROPS_2","CB_PROTO_PROPS_2_1","e_2_1","el","querySelector","Error","MDCComponent","inputPropDesc","LABEL_SELECTOR","MDCFormFieldFoundation","click","handleClick","activateInputRipple","deactivateInputRipple","requestAnimationFrame","MDCFormField","labelEl","input","ripple","activate","deactivate","checkboxCss","Checkbox","id","createRandomString","helperTextId","isInvalid","invalid","required","modified","element","limelCheckbox","shadowRoot","formField","mdcCheckbox","getCheckboxElement","onChange","event","stopPropagation","change","emit","handleCheckedChange","newValue","handleIndeterminateChange","connectedCallback","componentDidLoad","disconnectedCallback","_b","checkboxElement","render","h","CheckboxTemplate","readonly","label","helperText"],"sources":["./node_modules/@material/checkbox/constants.js","./node_modules/@material/checkbox/foundation.js","./node_modules/@material/checkbox/component.js","./node_modules/@material/form-field/constants.js","./node_modules/@material/form-field/foundation.js","./node_modules/@material/form-field/component.js","./src/components/checkbox/checkbox.scss?tag=limel-checkbox&encapsulation=shadow","./src/components/checkbox/checkbox.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2016 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 */\nexport var cssClasses = {\n ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate',\n ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked',\n ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked',\n ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked',\n ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked',\n ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate',\n BACKGROUND: 'mdc-checkbox__background',\n CHECKED: 'mdc-checkbox--checked',\n CHECKMARK: 'mdc-checkbox__checkmark',\n CHECKMARK_PATH: 'mdc-checkbox__checkmark-path',\n DISABLED: 'mdc-checkbox--disabled',\n INDETERMINATE: 'mdc-checkbox--indeterminate',\n MIXEDMARK: 'mdc-checkbox__mixedmark',\n NATIVE_CONTROL: 'mdc-checkbox__native-control',\n ROOT: 'mdc-checkbox',\n SELECTED: 'mdc-checkbox--selected',\n UPGRADED: 'mdc-checkbox--upgraded',\n};\nexport var strings = {\n ARIA_CHECKED_ATTR: 'aria-checked',\n ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed',\n DATA_INDETERMINATE_ATTR: 'data-indeterminate',\n NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control',\n TRANSITION_STATE_CHECKED: 'checked',\n TRANSITION_STATE_INDETERMINATE: 'indeterminate',\n TRANSITION_STATE_INIT: 'init',\n TRANSITION_STATE_UNCHECKED: 'unchecked',\n};\nexport var numbers = {\n ANIM_END_LATCH_MS: 250,\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 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 MDCCheckboxFoundation = /** @class */ (function (_super) {\n __extends(MDCCheckboxFoundation, _super);\n function MDCCheckboxFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCCheckboxFoundation.defaultAdapter), adapter)) || this;\n _this.currentCheckState = strings.TRANSITION_STATE_INIT;\n _this.currentAnimationClass = '';\n _this.animEndLatchTimer = 0;\n _this.enableAnimationEndHandler = false;\n return _this;\n }\n Object.defineProperty(MDCCheckboxFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckboxFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n forceLayout: function () { return undefined; },\n hasNativeControl: function () { return false; },\n isAttachedToDOM: function () { return false; },\n isChecked: function () { return false; },\n isIndeterminate: function () { return false; },\n removeClass: function () { return undefined; },\n removeNativeControlAttr: function () { return undefined; },\n setNativeControlAttr: function () { return undefined; },\n setNativeControlDisabled: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCCheckboxFoundation.prototype.init = function () {\n this.currentCheckState = this.determineCheckState();\n this.updateAriaChecked();\n this.adapter.addClass(cssClasses.UPGRADED);\n };\n MDCCheckboxFoundation.prototype.destroy = function () {\n clearTimeout(this.animEndLatchTimer);\n };\n MDCCheckboxFoundation.prototype.setDisabled = function (disabled) {\n this.adapter.setNativeControlDisabled(disabled);\n if (disabled) {\n this.adapter.addClass(cssClasses.DISABLED);\n }\n else {\n this.adapter.removeClass(cssClasses.DISABLED);\n }\n };\n /**\n * Handles the animationend event for the checkbox\n */\n MDCCheckboxFoundation.prototype.handleAnimationEnd = function () {\n var _this = this;\n if (!this.enableAnimationEndHandler) {\n return;\n }\n clearTimeout(this.animEndLatchTimer);\n this.animEndLatchTimer = setTimeout(function () {\n _this.adapter.removeClass(_this.currentAnimationClass);\n _this.enableAnimationEndHandler = false;\n }, numbers.ANIM_END_LATCH_MS);\n };\n /**\n * Handles the change event for the checkbox\n */\n MDCCheckboxFoundation.prototype.handleChange = function () {\n this.transitionCheckState();\n };\n MDCCheckboxFoundation.prototype.transitionCheckState = function () {\n if (!this.adapter.hasNativeControl()) {\n return;\n }\n var oldState = this.currentCheckState;\n var newState = this.determineCheckState();\n if (oldState === newState) {\n return;\n }\n this.updateAriaChecked();\n var TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n var SELECTED = cssClasses.SELECTED;\n if (newState === TRANSITION_STATE_UNCHECKED) {\n this.adapter.removeClass(SELECTED);\n }\n else {\n this.adapter.addClass(SELECTED);\n }\n // Check to ensure that there isn't a previously existing animation class, in case for example\n // the user interacted with the checkbox before the animation was finished.\n if (this.currentAnimationClass.length > 0) {\n clearTimeout(this.animEndLatchTimer);\n this.adapter.forceLayout();\n this.adapter.removeClass(this.currentAnimationClass);\n }\n this.currentAnimationClass =\n this.getTransitionAnimationClass(oldState, newState);\n this.currentCheckState = newState;\n // Check for parentNode so that animations are only run when the element is attached\n // to the DOM.\n if (this.adapter.isAttachedToDOM() &&\n this.currentAnimationClass.length > 0) {\n this.adapter.addClass(this.currentAnimationClass);\n this.enableAnimationEndHandler = true;\n }\n };\n MDCCheckboxFoundation.prototype.determineCheckState = function () {\n var TRANSITION_STATE_INDETERMINATE = strings.TRANSITION_STATE_INDETERMINATE, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n if (this.adapter.isIndeterminate()) {\n return TRANSITION_STATE_INDETERMINATE;\n }\n return this.adapter.isChecked() ? TRANSITION_STATE_CHECKED :\n TRANSITION_STATE_UNCHECKED;\n };\n MDCCheckboxFoundation.prototype.getTransitionAnimationClass = function (oldState, newState) {\n var TRANSITION_STATE_INIT = strings.TRANSITION_STATE_INIT, TRANSITION_STATE_CHECKED = strings.TRANSITION_STATE_CHECKED, TRANSITION_STATE_UNCHECKED = strings.TRANSITION_STATE_UNCHECKED;\n var _a = MDCCheckboxFoundation.cssClasses, ANIM_UNCHECKED_CHECKED = _a.ANIM_UNCHECKED_CHECKED, ANIM_UNCHECKED_INDETERMINATE = _a.ANIM_UNCHECKED_INDETERMINATE, ANIM_CHECKED_UNCHECKED = _a.ANIM_CHECKED_UNCHECKED, ANIM_CHECKED_INDETERMINATE = _a.ANIM_CHECKED_INDETERMINATE, ANIM_INDETERMINATE_CHECKED = _a.ANIM_INDETERMINATE_CHECKED, ANIM_INDETERMINATE_UNCHECKED = _a.ANIM_INDETERMINATE_UNCHECKED;\n switch (oldState) {\n case TRANSITION_STATE_INIT:\n if (newState === TRANSITION_STATE_UNCHECKED) {\n return '';\n }\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n case TRANSITION_STATE_UNCHECKED:\n return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;\n case TRANSITION_STATE_CHECKED:\n return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;\n default: // TRANSITION_STATE_INDETERMINATE\n return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;\n }\n };\n MDCCheckboxFoundation.prototype.updateAriaChecked = function () {\n // Ensure aria-checked is set to mixed if checkbox is in indeterminate state.\n if (this.adapter.isIndeterminate()) {\n this.adapter.setNativeControlAttr(strings.ARIA_CHECKED_ATTR, strings.ARIA_CHECKED_INDETERMINATE_VALUE);\n }\n else {\n // The on/off state does not need to keep track of aria-checked, since\n // the screenreader uses the checked property on the checkbox element.\n this.adapter.removeNativeControlAttr(strings.ARIA_CHECKED_ATTR);\n }\n };\n return MDCCheckboxFoundation;\n}(MDCFoundation));\nexport { MDCCheckboxFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCCheckboxFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2016 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, __values } from \"tslib\";\nimport { getCorrectEventName } from '@material/animation/util';\nimport { MDCComponent } from '@material/base/component';\nimport { applyPassive } from '@material/dom/events';\nimport { matches } from '@material/dom/ponyfill';\nimport { MDCRipple } from '@material/ripple/component';\nimport { MDCRippleFoundation } from '@material/ripple/foundation';\nimport { strings } from './constants';\nimport { MDCCheckboxFoundation } from './foundation';\nvar CB_PROTO_PROPS = ['checked', 'indeterminate'];\nvar MDCCheckbox = /** @class */ (function (_super) {\n __extends(MDCCheckbox, _super);\n function MDCCheckbox() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.rippleSurface = _this.createRipple();\n return _this;\n }\n MDCCheckbox.attachTo = function (root) {\n return new MDCCheckbox(root);\n };\n Object.defineProperty(MDCCheckbox.prototype, \"ripple\", {\n get: function () {\n return this.rippleSurface;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"checked\", {\n get: function () {\n return this.getNativeControl().checked;\n },\n set: function (checked) {\n this.getNativeControl().checked = checked;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"indeterminate\", {\n get: function () {\n return this.getNativeControl().indeterminate;\n },\n set: function (indeterminate) {\n this.getNativeControl().indeterminate = indeterminate;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"disabled\", {\n get: function () {\n return this.getNativeControl().disabled;\n },\n set: function (disabled) {\n this.foundation.setDisabled(disabled);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCCheckbox.prototype, \"value\", {\n get: function () {\n return this.getNativeControl().value;\n },\n set: function (value) {\n this.getNativeControl().value = value;\n },\n enumerable: false,\n configurable: true\n });\n MDCCheckbox.prototype.initialize = function () {\n var DATA_INDETERMINATE_ATTR = strings.DATA_INDETERMINATE_ATTR;\n this.getNativeControl().indeterminate =\n this.getNativeControl().getAttribute(DATA_INDETERMINATE_ATTR) ===\n 'true';\n this.getNativeControl().removeAttribute(DATA_INDETERMINATE_ATTR);\n };\n MDCCheckbox.prototype.initialSyncWithDOM = function () {\n var _this = this;\n this.handleChange = function () {\n _this.foundation.handleChange();\n };\n this.handleAnimationEnd = function () {\n _this.foundation.handleAnimationEnd();\n };\n this.getNativeControl().addEventListener('change', this.handleChange);\n this.listen(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.installPropertyChangeHooks();\n };\n MDCCheckbox.prototype.destroy = function () {\n this.rippleSurface.destroy();\n this.getNativeControl().removeEventListener('change', this.handleChange);\n this.unlisten(getCorrectEventName(window, 'animationend'), this.handleAnimationEnd);\n this.uninstallPropertyChangeHooks();\n _super.prototype.destroy.call(this);\n };\n MDCCheckbox.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) { return _this.root.classList.add(className); },\n forceLayout: function () { return _this.root.offsetWidth; },\n hasNativeControl: function () { return !!_this.getNativeControl(); },\n isAttachedToDOM: function () { return Boolean(_this.root.parentNode); },\n isChecked: function () { return _this.checked; },\n isIndeterminate: function () { return _this.indeterminate; },\n removeClass: function (className) {\n _this.root.classList.remove(className);\n },\n removeNativeControlAttr: function (attr) {\n _this.getNativeControl().removeAttribute(attr);\n },\n setNativeControlAttr: function (attr, value) {\n _this.getNativeControl().setAttribute(attr, value);\n },\n setNativeControlDisabled: function (disabled) {\n _this.getNativeControl().disabled = disabled;\n },\n };\n return new MDCCheckboxFoundation(adapter);\n };\n MDCCheckbox.prototype.createRipple = 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 = __assign(__assign({}, MDCRipple.createAdapter(this)), { deregisterInteractionHandler: function (evtType, handler) {\n _this.getNativeControl().removeEventListener(evtType, handler, applyPassive());\n }, isSurfaceActive: function () { return matches(_this.getNativeControl(), ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) {\n _this.getNativeControl().addEventListener(evtType, handler, applyPassive());\n } });\n return new MDCRipple(this.root, new MDCRippleFoundation(adapter));\n };\n MDCCheckbox.prototype.installPropertyChangeHooks = function () {\n var e_1, _a;\n var _this = this;\n var nativeCb = this.getNativeControl();\n var cbProto = Object.getPrototypeOf(nativeCb);\n var _loop_1 = function (controlState) {\n var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n // We have to check for this descriptor, since some browsers (Safari) don't support its return.\n // See: https://bugs.webkit.org/show_bug.cgi?id=49739\n if (!validDescriptor(desc)) {\n return { value: void 0 };\n }\n // Type cast is needed for compatibility with Closure Compiler.\n var nativeGetter = desc.get;\n var nativeCbDesc = {\n configurable: desc.configurable,\n enumerable: desc.enumerable,\n get: nativeGetter,\n set: function (state) {\n desc.set.call(nativeCb, state);\n _this.foundation.handleChange();\n },\n };\n Object.defineProperty(nativeCb, controlState, nativeCbDesc);\n };\n try {\n for (var CB_PROTO_PROPS_1 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next(); !CB_PROTO_PROPS_1_1.done; CB_PROTO_PROPS_1_1 = CB_PROTO_PROPS_1.next()) {\n var controlState = CB_PROTO_PROPS_1_1.value;\n var state_1 = _loop_1(controlState);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (CB_PROTO_PROPS_1_1 && !CB_PROTO_PROPS_1_1.done && (_a = CB_PROTO_PROPS_1.return)) _a.call(CB_PROTO_PROPS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n MDCCheckbox.prototype.uninstallPropertyChangeHooks = function () {\n var e_2, _a;\n var nativeCb = this.getNativeControl();\n var cbProto = Object.getPrototypeOf(nativeCb);\n try {\n for (var CB_PROTO_PROPS_2 = __values(CB_PROTO_PROPS), CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next(); !CB_PROTO_PROPS_2_1.done; CB_PROTO_PROPS_2_1 = CB_PROTO_PROPS_2.next()) {\n var controlState = CB_PROTO_PROPS_2_1.value;\n var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);\n if (!validDescriptor(desc)) {\n return;\n }\n Object.defineProperty(nativeCb, controlState, desc);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (CB_PROTO_PROPS_2_1 && !CB_PROTO_PROPS_2_1.done && (_a = CB_PROTO_PROPS_2.return)) _a.call(CB_PROTO_PROPS_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n MDCCheckbox.prototype.getNativeControl = function () {\n var NATIVE_CONTROL_SELECTOR = strings.NATIVE_CONTROL_SELECTOR;\n var el = this.root.querySelector(NATIVE_CONTROL_SELECTOR);\n if (!el) {\n throw new Error(\"Checkbox component requires a \" + NATIVE_CONTROL_SELECTOR + \" element\");\n }\n return el;\n };\n return MDCCheckbox;\n}(MDCComponent));\nexport { MDCCheckbox };\nfunction validDescriptor(inputPropDesc) {\n return !!inputPropDesc && typeof inputPropDesc.set === 'function';\n}\n//# sourceMappingURL=component.js.map","/**\n * @license\n * Copyright 2017 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 */\nexport var cssClasses = {\n ROOT: 'mdc-form-field',\n};\nexport var strings = {\n LABEL_SELECTOR: '.mdc-form-field > label',\n};\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2017 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 MDCFormFieldFoundation = /** @class */ (function (_super) {\n __extends(MDCFormFieldFoundation, _super);\n function MDCFormFieldFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this;\n _this.click = function () {\n _this.handleClick();\n };\n return _this;\n }\n Object.defineProperty(MDCFormFieldFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFormFieldFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCFormFieldFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n activateInputRipple: function () { return undefined; },\n deactivateInputRipple: function () { return undefined; },\n deregisterInteractionHandler: function () { return undefined; },\n registerInteractionHandler: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCFormFieldFoundation.prototype.init = function () {\n this.adapter.registerInteractionHandler('click', this.click);\n };\n MDCFormFieldFoundation.prototype.destroy = function () {\n this.adapter.deregisterInteractionHandler('click', this.click);\n };\n MDCFormFieldFoundation.prototype.handleClick = function () {\n var _this = this;\n this.adapter.activateInputRipple();\n requestAnimationFrame(function () {\n _this.adapter.deactivateInputRipple();\n });\n };\n return MDCFormFieldFoundation;\n}(MDCFoundation));\nexport { MDCFormFieldFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCFormFieldFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2017 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 { MDCFormFieldFoundation } from './foundation';\nvar MDCFormField = /** @class */ (function (_super) {\n __extends(MDCFormField, _super);\n function MDCFormField() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCFormField.attachTo = function (root) {\n return new MDCFormField(root);\n };\n MDCFormField.prototype.labelEl = function () {\n var LABEL_SELECTOR = MDCFormFieldFoundation.strings.LABEL_SELECTOR;\n return this.root.querySelector(LABEL_SELECTOR);\n };\n MDCFormField.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 activateInputRipple: function () {\n if (_this.input && _this.input.ripple) {\n _this.input.ripple.activate();\n }\n },\n deactivateInputRipple: function () {\n if (_this.input && _this.input.ripple) {\n _this.input.ripple.deactivate();\n }\n },\n deregisterInteractionHandler: function (evtType, handler) {\n var labelEl = _this.labelEl();\n if (labelEl) {\n labelEl.removeEventListener(evtType, handler);\n }\n },\n registerInteractionHandler: function (evtType, handler) {\n var labelEl = _this.labelEl();\n if (labelEl) {\n labelEl.addEventListener(evtType, handler);\n }\n },\n };\n return new MDCFormFieldFoundation(adapter);\n };\n return MDCFormField;\n}(MDCComponent));\nexport { MDCFormField };\n//# sourceMappingURL=component.js.map","@use '../../style/internal/lime-theme';\n@use '@material/checkbox';\n@use '@material/form-field';\n\n/**\n* @prop --checkbox-unchecked-border-color: Affects the border color of the default state of the checkbox (when it is not checked). Defaults to `--contrast-900`.\n*/\n\n@mixin custom-checkbox-styles {\n // This is used in other components too, such as `limel-list`\n --mdc-checkbox-checked-color: var(--mdc-theme-primary);\n --mdc-checkbox-unchecked-color: var(\n --checkbox-unchecked-border-color,\n rgb(var(--contrast-900))\n );\n --lime-checkbox-unchecked-color: rgb(var(--contrast-300));\n}\n\n:host(limel-checkbox) {\n @include custom-checkbox-styles;\n}\n\n@include checkbox.core-styles;\n@include form-field.core-styles;\n\n.mdc-form-field {\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-form-field {\n display: flex;\n\n .mdc-checkbox {\n .mdc-checkbox__native-control {\n &[disabled],\n &:enabled {\n &:not(:checked):not(:indeterminate) {\n ~ .mdc-checkbox__background {\n background-color: var(--lime-checkbox-unchecked-color);\n }\n }\n }\n }\n\n &.mdc-checkbox--invalid {\n .mdc-checkbox__native-control:enabled:not(:checked):not(\n :indeterminate\n )\n ~ .mdc-checkbox__background {\n border-color: var(--lime-error-text-color);\n }\n }\n .mdc-checkbox__native-control {\n &:focus-visible {\n + .mdc-checkbox__background {\n &:after {\n content: '';\n display: block;\n position: absolute;\n inset: -0.25rem;\n border-radius: 0.25rem;\n box-shadow: var(--shadow-depth-8-focused);\n }\n }\n }\n }\n }\n .mdc-checkbox--disabled {\n opacity: 0.5;\n }\n\n label {\n cursor: pointer;\n line-height: normal;\n padding-left: 0;\n\n &.mdc-checkbox--required::after {\n margin-left: 0.0625rem;\n content: '*';\n }\n\n &.mdc-checkbox--invalid {\n color: var(--lime-error-text-color);\n }\n }\n}\n\n@import './partial-styles/_helper-text.scss';\n@import './partial-styles/_readonly.scss';\n","import { MDCCheckbox, cssClasses } from '@material/checkbox';\nimport { MDCFormField } from '@material/form-field';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport { CheckboxTemplate } from './checkbox.template';\n\n/**\n * The Checkbox component is a classic and essential element in UI design that allows\n * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to\n * select one or more items from a list of choices.\n *\n * ## States of a Checkbox\n * When a user clicks or taps on the box, it toggles between two states:\n * Checked and Unchecked.\n *\n * However, a Checkbox can visualize a third state called the \"Indeterminate\" state.\n * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.\n *\n * The Indeterminate state is typically used when dealing with checkbox groups\n * that have hierarchical relationships or when the group contains sub-items.\n * This state is used to indicate that that some, but not all, of the items in a group are selected.\n *\n * :::important\n * Checkboxes are sometimes used interchangeably with switches in user interfaces.\n * But there is an important difference between the two! Please read our guidelines about\n * [Switch vs. Checkbox](/#/DesignGuidelines/switch-vs-checkbox.md/).\n *\n * @exampleComponent limel-example-checkbox\n * @exampleComponent limel-example-checkbox-helper-text\n */\n@Component({\n tag: 'limel-checkbox',\n shadow: true,\n styleUrl: 'checkbox.scss',\n})\nexport class Checkbox {\n /**\n * Disables the checkbox when `true`. Works exactly the same as `readonly`.\n * If either property is `true`, the checkbox will be disabled.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Disables the checkbox when `true`. This visualizes the checkbox slightly differently.\n * But shows no visual sign indicating that the checkbox 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 is invalid.\n */\n @Prop({ reflect: true })\n public invalid: boolean;\n\n /**\n * The checkbox label.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Optional helper text to display below the checkbox\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * The value of the checkbox. Set to `true` to make the checkbox checked.\n */\n @Prop({ reflect: true })\n public checked = false;\n\n /**\n * Enables indeterminate state. Set to `true` to signal indeterminate check.\n */\n @Prop({ reflect: true })\n public indeterminate = false;\n\n /**\n * Set to `true` to indicate that the checkbox must be checked.\n */\n @Prop({ reflect: true })\n public required: boolean = false;\n\n @State()\n private modified = false;\n\n /**\n * Emitted when the input value is changed.\n */\n @Event()\n private change: EventEmitter<boolean>;\n\n @Element()\n private limelCheckbox: HTMLLimelCheckboxElement;\n\n private formField: MDCFormField;\n private mdcCheckbox: MDCCheckbox;\n private id: string = createRandomString();\n private helperTextId: string = createRandomString();\n\n @Watch('checked')\n protected handleCheckedChange(newValue: boolean) {\n this.mdcCheckbox.checked = newValue;\n }\n\n @Watch('indeterminate')\n protected handleIndeterminateChange(newValue: boolean) {\n this.mdcCheckbox.checked = this.checked;\n this.mdcCheckbox.indeterminate = newValue;\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n public disconnectedCallback() {\n this.mdcCheckbox?.destroy();\n this.formField?.destroy();\n\n const checkboxElement = this.getCheckboxElement();\n if (checkboxElement) {\n checkboxElement.classList.remove(\n cssClasses.ANIM_CHECKED_INDETERMINATE,\n cssClasses.ANIM_CHECKED_UNCHECKED,\n cssClasses.ANIM_INDETERMINATE_CHECKED,\n cssClasses.ANIM_INDETERMINATE_UNCHECKED,\n cssClasses.ANIM_UNCHECKED_CHECKED,\n cssClasses.ANIM_UNCHECKED_INDETERMINATE,\n );\n }\n }\n\n public render() {\n return (\n <CheckboxTemplate\n disabled={this.disabled || this.readonly}\n label={this.label}\n helperText={this.helperText}\n helperTextId={this.helperTextId}\n checked={this.checked || this.indeterminate}\n indeterminate={this.indeterminate}\n required={this.required}\n readonly={this.readonly}\n invalid={this.isInvalid()}\n onChange={this.onChange}\n id={this.id}\n />\n );\n }\n\n private isInvalid = () => {\n if (this.invalid) {\n return true;\n }\n\n if (this.required && this.modified && !this.checked) {\n return true;\n }\n };\n\n private initialize = () => {\n const element =\n this.limelCheckbox.shadowRoot.querySelector('.mdc-form-field');\n if (!element) {\n return;\n }\n\n this.formField = new MDCFormField(element);\n this.mdcCheckbox = new MDCCheckbox(this.getCheckboxElement());\n this.formField.input = this.mdcCheckbox;\n };\n\n private getCheckboxElement = () => {\n return this.limelCheckbox.shadowRoot.querySelector('.mdc-checkbox');\n };\n\n private onChange = (event: Event) => {\n event.stopPropagation();\n this.change.emit(this.mdcCheckbox.checked);\n this.modified = true;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAsBO,IAAIA,EAAa,CACpBC,2BAA4B,2CAC5BC,uBAAwB,uCACxBC,2BAA4B,2CAC5BC,6BAA8B,6CAC9BC,uBAAwB,uCACxBC,6BAA8B,6CAC9BC,WAAY,2BACZC,QAAS,wBACTC,UAAW,0BACXC,eAAgB,+BAChBC,SAAU,yBACVC,cAAe,8BACfC,UAA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,c as t,h as r,g as s}from"./p-3075aa67.js";import{g as o}from"./p-88694767.js";const i="@charset \"UTF-8\";.flow-item{--step-background:var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );--step-background--selected:var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );--step-background--passed:var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );--step-text:var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );--step-text--selected:var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );--step-text--passed:var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );--step-divider-color:var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );position:relative;width:100%;display:flex;flex-direction:column;align-items:stretch}.flow-item:not(.off-progress-item,.last) .divider:after{content:\"\"}.flow-item.off-progress-item{padding-left:0.5rem}.flow-item.first-off-progress-item{padding-left:1rem}.step{transition:background-color 0.2s ease, box-shadow 0.2s ease;display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:var(--step-height);border:none;font-size:0.875rem}.step.disabled{cursor:not-allowed}.step.disabled.readonly{opacity:1;cursor:default}.step:focus{outline:none}.step:focus-visible{box-shadow:var(--shadow-depth-8-focused)}.flow-item:not(.off-progress-item,.first) .step{padding-left:calc(var(--step-height) / 2)}.flow-item:not(.selected) .step:not(.disabled){cursor:pointer}.flow-item:not(.selected) .step:not(.disabled):hover{box-shadow:var(--button-shadow-normal)}.flow-item:not(.selected) .step:not(.disabled):active{box-shadow:var(--button-shadow-pressed)}.off-progress-item .step{border-radius:0.25rem;padding:0 0.75rem}.off-progress-item .step .icon{margin-left:0}.flow-item.first .step{border-top-left-radius:var(--step-height);border-bottom-left-radius:var(--step-height);padding-left:1.25rem}.flow-item.last .step{border-top-right-radius:var(--step-height);border-bottom-right-radius:var(--step-height);padding-right:1.25rem}.divider{display:flex;align-items:center;justify-content:center;width:var(--step-height);height:var(--step-height);position:absolute;z-index:1;right:calc(var(--step-height) / 2 * -1);overflow:hidden}.divider:after{position:absolute;display:block;box-sizing:border-box;transition:background-color 0.2s ease;width:100%;height:100%;right:calc(var(--step-height) / 5);transform:rotate(45deg);border-style:solid;border-width:0.125rem 0.125rem 0 0;border-radius:0 0.5rem 0 0;border-color:var(--step-divider-color)}.flow-item.last .divider{width:0}.text,.secondary-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:var(--max-text-width);z-index:2}.secondary-text{font-size:0.75rem;margin:auto;padding-left:calc(var(--step-height) / 2)}.icon{margin:0 0.5rem 0 0.25rem;z-index:2}.step:before,.step:after{pointer-events:none;box-sizing:border-box;z-index:2;position:absolute;right:var(--selected-indicator-right);border-radius:50%}.last .step:before,.last .step:after{right:0.5rem}.flow-item:not(.off-progress-item) .step.selected:before,.flow-item:not(.off-progress-item) .step.selected:after{content:\"\";width:0.375rem;height:0.375rem}.flow-item:not(.off-progress-item) .step.selected:before{background-color:var(--step-divider-color);opacity:0.7}.flow-item:not(.off-progress-item) .step.disabled:before,.flow-item:not(.off-progress-item) .step.disabled:after{width:0.75rem;height:0.75rem}.flow-item:not(.off-progress-item) .step.disabled:after{content:\"\";background-image:url(\"data:image/svg+xml;charset=utf-8, <svg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg' xml:space='preserve' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2'><path fill='rgb(127,127,127)' d='M32.18 13.711c0-2.207-1.793-4-4.002-4H11.821c-2.208 0-4 1.793-4 4V28.29a4 4 0 0 0 4 4h16.357a4.002 4.002 0 0 0 4.001-4V13.711Z'/><path fill='rgb(127,127,127)' d='M11.211 9.758V7.673A7.489 7.489 0 0 1 18.696.188h2.608a7.489 7.489 0 0 1 7.485 7.485v2.085h-3V7.673a4.488 4.488 0 0 0-4.485-4.485h-2.608a4.488 4.488 0 0 0-4.485 4.485v2.085h-3Z'/></svg>\");background-size:90%;background-repeat:no-repeat;background-position:center;mix-blend-mode:multiply}.step{color:var(--step-text);background-color:var(--step-background)}.step .icon{color:var(--progress-flow-icon-color--inactive, var(--step-text))}.flow-item.selected .step{color:var(--step-text--selected);background-color:var(--step-background--selected)}.flow-item.selected .step .divider:after{background-color:var(--step-background--selected)}.flow-item.selected .step .icon{color:var(--step-text--selected)}.flow-item.passed .step{color:var(--step-text--passed);background-color:var(--step-background--passed)}.flow-item.passed .step .divider:after{background-color:var(--step-background--passed)}.flow-item.passed .step .icon{color:var(--step-text--passed)}.divider:after{border-color:var(--step-divider-color);background-color:var(--step-background)}";const a=class{constructor(r){e(this,r);this.interact=t(this,"interact",7);this.handleClick=()=>{this.interact.emit()};this.item=null;this.disabled=false;this.readonly=false;this.currentStep=false}render(){var e;if(!this.item){return}return[r("button",{tabindex:"0",title:this.getToolTipText(),type:"button",class:{step:true,selected:(e=this.item)===null||e===void 0?void 0:e.selected,disabled:this.isDisabled(),readonly:this.readonly},onClick:this.handleClick,disabled:this.isDisabled(),"aria-current":this.currentStep?"step":null},this.renderIcon(),r("span",{class:"text"},this.item.text),this.renderDivider()),this.renderSecondaryText()]}isDisabled(){var e;return((e=this.item)===null||e===void 0?void 0:e.disabled)||this.readonly||this.disabled}getToolTipText(){if(!this.item.secondaryText){return this.item.text}return[this.item.text,this.item.secondaryText].join(" · ")}renderSecondaryText(){var e;if(!((e=this.item)===null||e===void 0?void 0:e.secondaryText)){return}return r("div",{class:"secondary-text"},this.item.secondaryText)}renderIcon(){if(!this.item.icon){return}const e=o(this.item.icon);return r("limel-icon",{name:e,size:"small",class:"icon"})}renderDivider(){if(this.item.isOffProgress){return}return r("div",{class:"divider"})}get element(){return s(this)}};a.style=i;export{a as limel_progress_flow_item};
2
- //# sourceMappingURL=p-cb1ba78f.entry.js.map
1
+ import{r as e,c as t,h as r,g as s}from"./p-3075aa67.js";import{g as o}from"./p-5f026843.js";const i="@charset \"UTF-8\";.flow-item{--step-background:var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );--step-background--selected:var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );--step-background--passed:var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );--step-text:var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );--step-text--selected:var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );--step-text--passed:var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );--step-divider-color:var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );position:relative;width:100%;display:flex;flex-direction:column;align-items:stretch}.flow-item:not(.off-progress-item,.last) .divider:after{content:\"\"}.flow-item.off-progress-item{padding-left:0.5rem}.flow-item.first-off-progress-item{padding-left:1rem}.step{transition:background-color 0.2s ease, box-shadow 0.2s ease;display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:var(--step-height);border:none;font-size:0.875rem}.step.disabled{cursor:not-allowed}.step.disabled.readonly{opacity:1;cursor:default}.step:focus{outline:none}.step:focus-visible{box-shadow:var(--shadow-depth-8-focused)}.flow-item:not(.off-progress-item,.first) .step{padding-left:calc(var(--step-height) / 2)}.flow-item:not(.selected) .step:not(.disabled){cursor:pointer}.flow-item:not(.selected) .step:not(.disabled):hover{box-shadow:var(--button-shadow-normal)}.flow-item:not(.selected) .step:not(.disabled):active{box-shadow:var(--button-shadow-pressed)}.off-progress-item .step{border-radius:0.25rem;padding:0 0.75rem}.off-progress-item .step .icon{margin-left:0}.flow-item.first .step{border-top-left-radius:var(--step-height);border-bottom-left-radius:var(--step-height);padding-left:1.25rem}.flow-item.last .step{border-top-right-radius:var(--step-height);border-bottom-right-radius:var(--step-height);padding-right:1.25rem}.divider{display:flex;align-items:center;justify-content:center;width:var(--step-height);height:var(--step-height);position:absolute;z-index:1;right:calc(var(--step-height) / 2 * -1);overflow:hidden}.divider:after{position:absolute;display:block;box-sizing:border-box;transition:background-color 0.2s ease;width:100%;height:100%;right:calc(var(--step-height) / 5);transform:rotate(45deg);border-style:solid;border-width:0.125rem 0.125rem 0 0;border-radius:0 0.5rem 0 0;border-color:var(--step-divider-color)}.flow-item.last .divider{width:0}.text,.secondary-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:var(--max-text-width);z-index:2}.secondary-text{font-size:0.75rem;margin:auto;padding-left:calc(var(--step-height) / 2)}.icon{margin:0 0.5rem 0 0.25rem;z-index:2}.step:before,.step:after{pointer-events:none;box-sizing:border-box;z-index:2;position:absolute;right:var(--selected-indicator-right);border-radius:50%}.last .step:before,.last .step:after{right:0.5rem}.flow-item:not(.off-progress-item) .step.selected:before,.flow-item:not(.off-progress-item) .step.selected:after{content:\"\";width:0.375rem;height:0.375rem}.flow-item:not(.off-progress-item) .step.selected:before{background-color:var(--step-divider-color);opacity:0.7}.flow-item:not(.off-progress-item) .step.disabled:before,.flow-item:not(.off-progress-item) .step.disabled:after{width:0.75rem;height:0.75rem}.flow-item:not(.off-progress-item) .step.disabled:after{content:\"\";background-image:url(\"data:image/svg+xml;charset=utf-8, <svg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg' xml:space='preserve' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2'><path fill='rgb(127,127,127)' d='M32.18 13.711c0-2.207-1.793-4-4.002-4H11.821c-2.208 0-4 1.793-4 4V28.29a4 4 0 0 0 4 4h16.357a4.002 4.002 0 0 0 4.001-4V13.711Z'/><path fill='rgb(127,127,127)' d='M11.211 9.758V7.673A7.489 7.489 0 0 1 18.696.188h2.608a7.489 7.489 0 0 1 7.485 7.485v2.085h-3V7.673a4.488 4.488 0 0 0-4.485-4.485h-2.608a4.488 4.488 0 0 0-4.485 4.485v2.085h-3Z'/></svg>\");background-size:90%;background-repeat:no-repeat;background-position:center;mix-blend-mode:multiply}.step{color:var(--step-text);background-color:var(--step-background)}.step .icon{color:var(--progress-flow-icon-color--inactive, var(--step-text))}.flow-item.selected .step{color:var(--step-text--selected);background-color:var(--step-background--selected)}.flow-item.selected .step .divider:after{background-color:var(--step-background--selected)}.flow-item.selected .step .icon{color:var(--step-text--selected)}.flow-item.passed .step{color:var(--step-text--passed);background-color:var(--step-background--passed)}.flow-item.passed .step .divider:after{background-color:var(--step-background--passed)}.flow-item.passed .step .icon{color:var(--step-text--passed)}.divider:after{border-color:var(--step-divider-color);background-color:var(--step-background)}";const a=class{constructor(r){e(this,r);this.interact=t(this,"interact",7);this.handleClick=()=>{this.interact.emit()};this.item=null;this.disabled=false;this.readonly=false;this.currentStep=false}render(){var e;if(!this.item){return}return[r("button",{tabindex:"0",title:this.getToolTipText(),type:"button",class:{step:true,selected:(e=this.item)===null||e===void 0?void 0:e.selected,disabled:this.isDisabled(),readonly:this.readonly},onClick:this.handleClick,disabled:this.isDisabled(),"aria-current":this.currentStep?"step":null},this.renderIcon(),r("span",{class:"text"},this.item.text),this.renderDivider()),this.renderSecondaryText()]}isDisabled(){var e;return((e=this.item)===null||e===void 0?void 0:e.disabled)||this.readonly||this.disabled}getToolTipText(){if(!this.item.secondaryText){return this.item.text}return[this.item.text,this.item.secondaryText].join(" · ")}renderSecondaryText(){var e;if(!((e=this.item)===null||e===void 0?void 0:e.secondaryText)){return}return r("div",{class:"secondary-text"},this.item.secondaryText)}renderIcon(){if(!this.item.icon){return}const e=o(this.item.icon);return r("limel-icon",{name:e,size:"small",class:"icon"})}renderDivider(){if(this.item.isOffProgress){return}return r("div",{class:"divider"})}get element(){return s(this)}};a.style=i;export{a as limel_progress_flow_item};
2
+ //# sourceMappingURL=p-d292a48e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e,g as o}from"./p-3075aa67.js";import{c as r}from"./p-3ccdc4a3.js";import{m as a,r as n}from"./p-f1988eb7.js";import{g as s,a as l}from"./p-88694767.js";const c='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:0.875rem;padding:0 0.25rem}button:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover{color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}div[role=separator]{width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){div[role=separator]{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const h=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.handleClick=t=>{t.stopPropagation();this.select.emit(this.item)};this.item=undefined;this.isVisible=true;this.tooltipId=r()}componentWillLoad(){a(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){n(this.host)}render(){if(!this.isItem(this.item)&&this.item.separator){return e("div",{role:"separator"})}return e("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled()},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){if(this.isItem(this.item)&&this.item.disabled){return true}if(!this.isVisible){return true}}renderIcon(){if(this.isItem(this.item)&&!this.item.icon){return}if("icon"in this.item){const t=s(this.item.icon);const i=l(this.item.icon,this.item.iconColor);return e("limel-icon",{name:t,style:{"--action-bar-item-icon-color":`${i}`}})}}renderLabel(){if(!this.isItem(this.item)||this.item.iconOnly){return}return e("span",{class:"text"},this.item.text)}renderTooltip(){if(!this.isItem(this.item)){return}if(this.item.text){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.text,helperLabel:this.item.commandText})}if(this.item.commandText){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.commandText})}}triggerIconColorWarning(){if(this.isItem(this.item)&&this.item.iconColor){console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}}get host(){return o(this)}};h.style=c;const d=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.countOverflowedItems=()=>`+${this.numberOfMenuItems}`;this.handleSelect=t=>{t.stopPropagation();this.select.emit(t.detail)};this.items=undefined;this.openDirection="bottom-end"}render(){return[e("limel-menu",{openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},e("button",{slot:"trigger"},this.countOverflowedItems()))]}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{h as limel_action_bar_item,d as limel_action_bar_overflow_menu};
2
- //# sourceMappingURL=p-b9b48ece.entry.js.map
1
+ import{r as t,c as i,h as e,g as o}from"./p-3075aa67.js";import{c as r}from"./p-3ccdc4a3.js";import{m as a,r as n}from"./p-f1988eb7.js";import{g as s,a as l}from"./p-5f026843.js";const c='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:0.875rem;padding:0 0.25rem}button:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover{color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}div[role=separator]{width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){div[role=separator]{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const h=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.handleClick=t=>{t.stopPropagation();this.select.emit(this.item)};this.item=undefined;this.isVisible=true;this.tooltipId=r()}componentWillLoad(){a(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){n(this.host)}render(){if(!this.isItem(this.item)&&this.item.separator){return e("div",{role:"separator"})}return e("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled()},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){if(this.isItem(this.item)&&this.item.disabled){return true}if(!this.isVisible){return true}}renderIcon(){if(this.isItem(this.item)&&!this.item.icon){return}if("icon"in this.item){const t=s(this.item.icon);const i=l(this.item.icon,this.item.iconColor);return e("limel-icon",{name:t,style:{"--action-bar-item-icon-color":`${i}`}})}}renderLabel(){if(!this.isItem(this.item)||this.item.iconOnly){return}return e("span",{class:"text"},this.item.text)}renderTooltip(){if(!this.isItem(this.item)){return}if(this.item.text){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.text,helperLabel:this.item.commandText})}if(this.item.commandText){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.commandText})}}triggerIconColorWarning(){if(this.isItem(this.item)&&this.item.iconColor){console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}}get host(){return o(this)}};h.style=c;const d=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.countOverflowedItems=()=>`+${this.numberOfMenuItems}`;this.handleSelect=t=>{t.stopPropagation();this.select.emit(t.detail)};this.items=undefined;this.openDirection="bottom-end"}render(){return[e("limel-menu",{openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},e("button",{slot:"trigger"},this.countOverflowedItems()))]}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{h as limel_action_bar_item,d as limel_action_bar_overflow_menu};
2
+ //# sourceMappingURL=p-d6e2b7b1.entry.js.map