@limetech/lime-elements 38.31.1 → 38.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/lime-elements.cjs.js +1 -1
  4. package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
  9. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  12. package/dist/cjs/limel-drag-handle.cjs.entry.js +34 -0
  13. package/dist/cjs/limel-drag-handle.cjs.entry.js.map +1 -0
  14. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-form.cjs.entry.js +3227 -307
  18. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  19. package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
  21. package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
  22. package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
  23. package/dist/cjs/limel-portal_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  25. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  26. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  27. package/dist/cjs/limel-snackbar.cjs.entry.js.map +1 -1
  28. package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
  29. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/{translations-d2be6dd7.js → translations-a42886f2.js} +17 -1
  32. package/dist/cjs/translations-a42886f2.js.map +1 -0
  33. package/dist/collection/collection-manifest.json +1 -0
  34. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +3 -0
  35. package/dist/collection/components/action-bar/action-bar.css +3 -0
  36. package/dist/collection/components/badge/badge.css +3 -0
  37. package/dist/collection/components/breadcrumbs/breadcrumbs.css +3 -0
  38. package/dist/collection/components/button/button.css +3 -0
  39. package/dist/collection/components/button-group/button-group.css +3 -0
  40. package/dist/collection/components/card/card.css +3 -0
  41. package/dist/collection/components/chart/chart.css +6 -0
  42. package/dist/collection/components/checkbox/checkbox.css +3 -0
  43. package/dist/collection/components/checkbox/checkbox.js +1 -1
  44. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  45. package/dist/collection/components/chip/chip.css +3 -0
  46. package/dist/collection/components/chip-set/chip-set.css +6 -0
  47. package/dist/collection/components/circular-progress/circular-progress.css +3 -0
  48. package/dist/collection/components/code-editor/code-editor.css +3 -0
  49. package/dist/collection/components/collapsible-section/collapsible-section.css +3 -0
  50. package/dist/collection/components/color-picker/color-picker-palette.css +3 -0
  51. package/dist/collection/components/color-picker/color-picker.css +3 -0
  52. package/dist/collection/components/color-picker/color-picker.js +1 -1
  53. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  54. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +3 -0
  55. package/dist/collection/components/dialog/dialog.css +3 -0
  56. package/dist/collection/components/dock/dock-button/dock-button.css +3 -0
  57. package/dist/collection/components/dock/dock.css +3 -0
  58. package/dist/collection/components/drag-handle/drag-handle.css +174 -0
  59. package/dist/collection/components/drag-handle/drag-handle.js +125 -0
  60. package/dist/collection/components/drag-handle/drag-handle.js.map +1 -0
  61. package/dist/collection/components/file/file.css +3 -0
  62. package/dist/collection/components/file-viewer/file-viewer.css +3 -0
  63. package/dist/collection/components/form/form.css +147 -20
  64. package/dist/collection/components/form/row/row.js +4 -1
  65. package/dist/collection/components/form/row/row.js.map +1 -1
  66. package/dist/collection/components/form/templates/array-field-collapsible-item.js +13 -16
  67. package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
  68. package/dist/collection/components/form/templates/array-field-simple-item.js +16 -49
  69. package/dist/collection/components/form/templates/array-field-simple-item.js.map +1 -1
  70. package/dist/collection/components/form/templates/array-field.js +306 -19
  71. package/dist/collection/components/form/templates/array-field.js.map +1 -1
  72. package/dist/collection/components/form/templates/common.js +3 -1
  73. package/dist/collection/components/form/templates/common.js.map +1 -1
  74. package/dist/collection/components/header/header.css +3 -0
  75. package/dist/collection/components/help/help.css +3 -0
  76. package/dist/collection/components/help/limel-help-content.css +3 -0
  77. package/dist/collection/components/icon-button/icon-button.css +3 -0
  78. package/dist/collection/components/info-tile/info-tile.css +3 -0
  79. package/dist/collection/components/input-field/input-field.css +3 -0
  80. package/dist/collection/components/list/list.css +6 -0
  81. package/dist/collection/components/list-item/list-item.css +3 -0
  82. package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.css +3 -0
  83. package/dist/collection/components/markdown/markdown.css +3 -0
  84. package/dist/collection/components/menu-list/menu-list.css +6 -0
  85. package/dist/collection/components/notched-outline/notched-outline.css +3 -0
  86. package/dist/collection/components/popover-surface/popover-surface.css +3 -0
  87. package/dist/collection/components/profile-picture/profile-picture.css +3 -0
  88. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +3 -0
  89. package/dist/collection/components/radio-button-group/radio-button.css +3 -0
  90. package/dist/collection/components/select/select.css +6 -0
  91. package/dist/collection/components/shortcut/shortcut.css +3 -0
  92. package/dist/collection/components/slider/slider.css +3 -0
  93. package/dist/collection/components/snackbar/snackbar.js +2 -2
  94. package/dist/collection/components/snackbar/snackbar.js.map +1 -1
  95. package/dist/collection/components/split-button/split-button.css +3 -0
  96. package/dist/collection/components/switch/switch.css +3 -0
  97. package/dist/collection/components/switch/switch.js +1 -1
  98. package/dist/collection/components/switch/switch.js.map +1 -1
  99. package/dist/collection/components/tab-bar/tab-bar.css +3 -0
  100. package/dist/collection/components/table/table.css +12 -0
  101. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +3 -0
  102. package/dist/collection/components/text-editor/text-editor.css +3 -0
  103. package/dist/collection/components/tooltip/tooltip.js +2 -2
  104. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  105. package/dist/collection/style/mixins.scss +53 -0
  106. package/dist/collection/translations/da.js +2 -0
  107. package/dist/collection/translations/da.js.map +1 -1
  108. package/dist/collection/translations/de.js +2 -0
  109. package/dist/collection/translations/de.js.map +1 -1
  110. package/dist/collection/translations/en.js +2 -0
  111. package/dist/collection/translations/en.js.map +1 -1
  112. package/dist/collection/translations/fi.js +2 -0
  113. package/dist/collection/translations/fi.js.map +1 -1
  114. package/dist/collection/translations/fr.js +2 -0
  115. package/dist/collection/translations/fr.js.map +1 -1
  116. package/dist/collection/translations/nl.js +2 -0
  117. package/dist/collection/translations/nl.js.map +1 -1
  118. package/dist/collection/translations/no.js +2 -0
  119. package/dist/collection/translations/no.js.map +1 -1
  120. package/dist/collection/translations/sv.js +2 -0
  121. package/dist/collection/translations/sv.js.map +1 -1
  122. package/dist/esm/lime-elements.js +1 -1
  123. package/dist/esm/limel-action-bar_2.entry.js +1 -1
  124. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  125. package/dist/esm/limel-callout.entry.js +1 -1
  126. package/dist/esm/limel-chart.entry.js +1 -1
  127. package/dist/esm/limel-checkbox.entry.js.map +1 -1
  128. package/dist/esm/limel-chip_2.entry.js +1 -1
  129. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  130. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  131. package/dist/esm/limel-drag-handle.entry.js +30 -0
  132. package/dist/esm/limel-drag-handle.entry.js.map +1 -0
  133. package/dist/esm/limel-file-viewer.entry.js +1 -1
  134. package/dist/esm/limel-file.entry.js +1 -1
  135. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  136. package/dist/esm/limel-form.entry.js +3221 -301
  137. package/dist/esm/limel-form.entry.js.map +1 -1
  138. package/dist/esm/limel-info-tile.entry.js +1 -1
  139. package/dist/esm/limel-info-tile.entry.js.map +1 -1
  140. package/dist/esm/limel-linear-progress.entry.js +1 -1
  141. package/dist/esm/limel-list-item.entry.js +1 -1
  142. package/dist/esm/limel-portal_3.entry.js.map +1 -1
  143. package/dist/esm/limel-profile-picture.entry.js +1 -1
  144. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  145. package/dist/esm/limel-snackbar.entry.js +1 -1
  146. package/dist/esm/limel-snackbar.entry.js.map +1 -1
  147. package/dist/esm/limel-switch.entry.js.map +1 -1
  148. package/dist/esm/limel-table.entry.js +1 -1
  149. package/dist/esm/loader.js +1 -1
  150. package/dist/esm/{translations-91c611da.js → translations-9bfde9f4.js} +17 -1
  151. package/dist/esm/translations-9bfde9f4.js.map +1 -0
  152. package/dist/lime-elements/lime-elements.esm.js +1 -1
  153. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  154. package/dist/lime-elements/p-309d0652.entry.js +2 -0
  155. package/dist/lime-elements/{p-e6245ef7.entry.js.map → p-309d0652.entry.js.map} +1 -1
  156. package/dist/lime-elements/{p-f507000e.entry.js → p-31f1cb08.entry.js} +2 -2
  157. package/dist/lime-elements/{p-cc7f4c81.entry.js → p-3311eaf3.entry.js} +2 -2
  158. package/dist/lime-elements/{p-aeba4aa4.entry.js → p-40542ccc.entry.js} +2 -2
  159. package/dist/lime-elements/p-40542ccc.entry.js.map +1 -0
  160. package/dist/lime-elements/{p-d349e355.entry.js → p-42e889d8.entry.js} +2 -2
  161. package/dist/lime-elements/p-489d7f63.entry.js.map +1 -1
  162. package/dist/lime-elements/p-51d475d8.entry.js.map +1 -1
  163. package/dist/lime-elements/p-5df2361b.js +2 -0
  164. package/dist/lime-elements/p-5df2361b.js.map +1 -0
  165. package/dist/lime-elements/{p-b5abf284.entry.js → p-5e976a59.entry.js} +2 -2
  166. package/dist/lime-elements/{p-6c60172e.entry.js → p-787be044.entry.js} +2 -2
  167. package/dist/lime-elements/p-8539647d.entry.js.map +1 -1
  168. package/dist/lime-elements/p-8ea3b80a.entry.js +2 -0
  169. package/dist/lime-elements/p-8ea3b80a.entry.js.map +1 -0
  170. package/dist/lime-elements/{p-d1aa44e1.entry.js → p-92aa9610.entry.js} +2 -2
  171. package/dist/lime-elements/p-a1a32893.entry.js +27 -0
  172. package/dist/lime-elements/p-a1a32893.entry.js.map +1 -0
  173. package/dist/lime-elements/{p-8e3c4418.entry.js → p-aa1e7319.entry.js} +2 -2
  174. package/dist/lime-elements/{p-ed04acfc.entry.js → p-b0acf522.entry.js} +2 -2
  175. package/dist/lime-elements/p-b5a96409.entry.js.map +1 -1
  176. package/dist/lime-elements/{p-f83ebd28.entry.js → p-b7bbb6a5.entry.js} +2 -2
  177. package/dist/lime-elements/{p-eb396630.entry.js → p-cd2f780a.entry.js} +2 -2
  178. package/dist/lime-elements/{p-aae161ef.entry.js → p-d79c85e2.entry.js} +2 -2
  179. package/dist/lime-elements/{p-1b036add.entry.js → p-e00465fa.entry.js} +2 -2
  180. package/dist/lime-elements/{p-29c2cdc6.entry.js → p-ee5c4112.entry.js} +2 -2
  181. package/dist/lime-elements/{p-e6bb4d1a.entry.js → p-fbac230b.entry.js} +2 -2
  182. package/dist/lime-elements/style/mixins.scss +53 -0
  183. package/dist/scss/mixins.scss +53 -0
  184. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  185. package/dist/types/components/color-picker/color-picker.d.ts +1 -1
  186. package/dist/types/components/drag-handle/drag-handle.d.ts +46 -0
  187. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +3 -1
  188. package/dist/types/components/form/templates/array-field-simple-item.d.ts +5 -9
  189. package/dist/types/components/form/templates/array-field.d.ts +35 -4
  190. package/dist/types/components/form/templates/common.d.ts +3 -3
  191. package/dist/types/components/snackbar/snackbar.d.ts +2 -2
  192. package/dist/types/components/switch/switch.d.ts +1 -1
  193. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  194. package/dist/types/components.d.ts +141 -28
  195. package/dist/types/translations/da.d.ts +2 -0
  196. package/dist/types/translations/de.d.ts +2 -0
  197. package/dist/types/translations/en.d.ts +2 -0
  198. package/dist/types/translations/fi.d.ts +2 -0
  199. package/dist/types/translations/fr.d.ts +2 -0
  200. package/dist/types/translations/nl.d.ts +2 -0
  201. package/dist/types/translations/no.d.ts +2 -0
  202. package/dist/types/translations/sv.d.ts +2 -0
  203. package/package.json +5 -2
  204. package/dist/cjs/translations-d2be6dd7.js.map +0 -1
  205. package/dist/esm/translations-91c611da.js.map +0 -1
  206. package/dist/lime-elements/p-4c88e5d3.js +0 -2
  207. package/dist/lime-elements/p-4c88e5d3.js.map +0 -1
  208. package/dist/lime-elements/p-aeba4aa4.entry.js.map +0 -1
  209. package/dist/lime-elements/p-d6d66daa.entry.js +0 -21
  210. package/dist/lime-elements/p-d6d66daa.entry.js.map +0 -1
  211. package/dist/lime-elements/p-e6245ef7.entry.js +0 -2
  212. /package/dist/lime-elements/{p-f507000e.entry.js.map → p-31f1cb08.entry.js.map} +0 -0
  213. /package/dist/lime-elements/{p-cc7f4c81.entry.js.map → p-3311eaf3.entry.js.map} +0 -0
  214. /package/dist/lime-elements/{p-d349e355.entry.js.map → p-42e889d8.entry.js.map} +0 -0
  215. /package/dist/lime-elements/{p-b5abf284.entry.js.map → p-5e976a59.entry.js.map} +0 -0
  216. /package/dist/lime-elements/{p-6c60172e.entry.js.map → p-787be044.entry.js.map} +0 -0
  217. /package/dist/lime-elements/{p-d1aa44e1.entry.js.map → p-92aa9610.entry.js.map} +0 -0
  218. /package/dist/lime-elements/{p-8e3c4418.entry.js.map → p-aa1e7319.entry.js.map} +0 -0
  219. /package/dist/lime-elements/{p-ed04acfc.entry.js.map → p-b0acf522.entry.js.map} +0 -0
  220. /package/dist/lime-elements/{p-f83ebd28.entry.js.map → p-b7bbb6a5.entry.js.map} +0 -0
  221. /package/dist/lime-elements/{p-eb396630.entry.js.map → p-cd2f780a.entry.js.map} +0 -0
  222. /package/dist/lime-elements/{p-aae161ef.entry.js.map → p-d79c85e2.entry.js.map} +0 -0
  223. /package/dist/lime-elements/{p-1b036add.entry.js.map → p-e00465fa.entry.js.map} +0 -0
  224. /package/dist/lime-elements/{p-29c2cdc6.entry.js.map → p-ee5c4112.entry.js.map} +0 -0
  225. /package/dist/lime-elements/{p-e6bb4d1a.entry.js.map → p-fbac230b.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as e,H as s,g as n}from"./p-288f0842.js";import{t as r}from"./p-4c88e5d3.js";import{i as a}from"./p-fc998171.js";import{a as o,E as l}from"./p-aa25f475.js";const h='@charset "UTF-8";:host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--action-bar-background-color, rgb(var(--contrast-100)));transition:max-width 0.3s ease}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-shrunk) .items{opacity:0}:host(limel-action-bar:not(.is-shrunk)) .items{opacity:1}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;border:1px solid rgb(var(--contrast-400));padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}:host(limel-action-bar.is-shrunk){max-width:5rem;transition:max-width 0.3s ease-in-out}:host(limel-action-bar.is-shrunk) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(180deg)}:host(limel-action-bar:not(.is-shrunk)){max-width:100%;transition:max-width 0.3s ease-in-out}:host(limel-action-bar:not(.is-shrunk)) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(0deg)}:host(limel-action-bar.can-be-shrunk.is-full-width) .expand-shrink{margin-left:auto}.expand-shrink{all:unset;box-sizing:border-box;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;justify-content:center;align-items:center}.expand-shrink:hover,.expand-shrink:focus,.expand-shrink:focus-visible{will-change:color, background-color, box-shadow, transform}.expand-shrink:hover,.expand-shrink:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.expand-shrink:hover{box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.expand-shrink:hover,.expand-shrink:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink limel-icon{width:1.5rem;height:1.5rem;padding:0.125rem;color:var(--action-bar-shrink-icon-color, rgb(var(--contrast-1000)))}';const c=class{constructor(s){i(this,s);this.itemSelected=t(this,"itemSelected",7);this.hasRendered=false;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.renderActionBarItem=(i,t)=>e("limel-action-bar-item",{item:i,onSelect:this.handleSelect,isVisible:this.isVisible(t),role:"gridcell"});this.renderOverflowMenu=i=>{if(!(this.actions.length-this.overflowCutoff)){return}const t={name:"more",color:"rgb(var(--contrast-1000))",title:this.getTranslation("action-bar.actions")};return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:i,onSelect:this.handleSelect,role:"gridcell",overFlowIcon:this.actionBarIsShrunk?t:undefined})};this.handleCollapseExpandClick=()=>{this.actionBarIsShrunk=!this.actionBarIsShrunk};this.handleSelect=i=>{i.stopPropagation();if(a(i.detail)){this.itemSelected.emit(i.detail)}};this.getTranslation=i=>r.get(i,this.language);this.handleIntersection=i=>{const t=i.filter((i=>i.isIntersecting));const e=i.filter((i=>!i.isIntersecting));if(this.isFirstIntersectionCheck){this.overflowCutoff=t.length}else{this.overflowCutoff=this.overflowCutoff+t.length-e.length}this.isFirstIntersectionCheck=false};this.actions=[];this.language=document.documentElement.lang;this.accessibleLabel=undefined;this.layout=undefined;this.collapsible=false;this.openDirection=undefined;this.overflowCutoff=this.actions.length;this.actionBarIsShrunk=false}connectedCallback(){if(this.hasRendered){this.createIntersectionObserver()}}componentDidRender(){var i;if(this.haveItemsChanged()){(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.createIntersectionObserver()}}disconnectedCallback(){var i;(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.intersectionObserver=undefined;this.actionBarItems=[]}render(){this.hasRendered=true;let i=[];if(this.actions.length>0){i=this.actions.slice(this.overflowCutoff)}return e(s,{"aria-label":this.accessibleLabel,class:{"is-full-width":this.layout==="fullWidth","is-floating":this.layout==="floating","is-shrunk":this.actionBarIsShrunk&&this.collapsible,"can-be-shrunk":!!this.collapsible},role:"grid"},e("div",{class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i),this.renderCollapseExpandButton())}renderCollapseExpandButton(){if(!this.collapsible||this.actions.length<=1){return}return e("button",{class:{"expand-shrink":true},"aria-label":this.tooltipLabel,type:"button",onClick:this.handleCollapseExpandClick},e("limel-icon",{name:"double_left",id:"tooltip-expand-shrink-button"}),e("limel-tooltip",{label:this.tooltipLabel,elementId:"tooltip-expand-shrink-button"}))}isVisible(i){return i<this.overflowCutoff}get tooltipLabel(){let i="action-bar.collapse";if(this.actionBarIsShrunk){i="action-bar.expand"}return this.getTranslation(i)}createIntersectionObserver(){const i={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i);for(const i of this.host.shadowRoot.querySelectorAll("limel-action-bar-item")){this.observe(i)}}observe(i){this.intersectionObserver.observe(i);this.actionBarItems.push(i)}haveItemsChanged(){const i=this.actionBarItems.some((i=>!this.host.shadowRoot.contains(i)));const t=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((i=>!this.actionBarItems.includes(i)));return i||t}get host(){return n(this)}};c.style=h;const d=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";const m=class{constructor(e){i(this,e);this.cancel=t(this,"cancel",7);this.save=t(this,"save",7);this.linkChange=t(this,"linkChange",7);this.getTranslation=i=>r.get(i,this.language);this.isValid=i=>{try{new URL(i)}catch(i){return false}return true};this.handleKeyDown=i=>{var t;if(i.key!==o){return}if(this.saveButton){this.saveButton.focus()}i.preventDefault();if(this.isValid((t=this.link)===null||t===void 0?void 0:t.href)){this.handleSave(i)}};this.handleCancel=i=>{if(i instanceof KeyboardEvent&&i.key!==l){return}i.stopPropagation();i.preventDefault();this.cancel.emit()};this.handleSave=i=>{i.stopPropagation();this.save.emit()};this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank");i.stopPropagation()};this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,(t=this.link)===null||t===void 0?void 0:t.href)};this.handleLinkValueChange=i=>{var t;const e=i.detail;this.emitLinkChange((t=this.link)===null||t===void 0?void 0:t.text,e)};this.emitLinkChange=(i,t)=>{const e={text:i,href:t};this.linkChange.emit(e)};this.link=undefined;this.language="en";this.isOpen=false}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){if(this.isOpen){document.addEventListener("keyup",this.handleCancel)}}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");if(i){requestAnimationFrame((()=>{i.focus()}))}}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{label:this.getTranslation("editor-link-menu.text"),value:((i=this.link)===null||i===void 0?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{label:this.getTranslation("editor-link-menu.link"),value:((t=this.link)===null||t===void 0?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{class:"actions"},e("limel-button",{label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{primary:true,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};m.style=d;export{c as limel_action_bar,m as limel_text_editor_link_menu};
2
- //# sourceMappingURL=p-cc7f4c81.entry.js.map
1
+ import{r as i,c as t,h as e,H as s,g as n}from"./p-288f0842.js";import{t as r}from"./p-5df2361b.js";import{i as a}from"./p-fc998171.js";import{a as o,E as l}from"./p-aa25f475.js";const h='@charset "UTF-8";:host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--action-bar-background-color, rgb(var(--contrast-100)));transition:max-width 0.3s ease}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-shrunk) .items{opacity:0}:host(limel-action-bar:not(.is-shrunk)) .items{opacity:1}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;border:1px solid rgb(var(--contrast-400));padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}:host(limel-action-bar.is-shrunk){max-width:5rem;transition:max-width 0.3s ease-in-out}:host(limel-action-bar.is-shrunk) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(180deg)}:host(limel-action-bar:not(.is-shrunk)){max-width:100%;transition:max-width 0.3s ease-in-out}:host(limel-action-bar:not(.is-shrunk)) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(0deg)}:host(limel-action-bar.can-be-shrunk.is-full-width) .expand-shrink{margin-left:auto}.expand-shrink{all:unset;box-sizing:border-box;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;justify-content:center;align-items:center}.expand-shrink:hover,.expand-shrink:focus,.expand-shrink:focus-visible{will-change:color, background-color, box-shadow, transform}.expand-shrink:hover,.expand-shrink:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.expand-shrink:hover{box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.expand-shrink:hover,.expand-shrink:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink limel-icon{width:1.5rem;height:1.5rem;padding:0.125rem;color:var(--action-bar-shrink-icon-color, rgb(var(--contrast-1000)))}';const c=class{constructor(s){i(this,s);this.itemSelected=t(this,"itemSelected",7);this.hasRendered=false;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.renderActionBarItem=(i,t)=>e("limel-action-bar-item",{item:i,onSelect:this.handleSelect,isVisible:this.isVisible(t),role:"gridcell"});this.renderOverflowMenu=i=>{if(!(this.actions.length-this.overflowCutoff)){return}const t={name:"more",color:"rgb(var(--contrast-1000))",title:this.getTranslation("action-bar.actions")};return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:i,onSelect:this.handleSelect,role:"gridcell",overFlowIcon:this.actionBarIsShrunk?t:undefined})};this.handleCollapseExpandClick=()=>{this.actionBarIsShrunk=!this.actionBarIsShrunk};this.handleSelect=i=>{i.stopPropagation();if(a(i.detail)){this.itemSelected.emit(i.detail)}};this.getTranslation=i=>r.get(i,this.language);this.handleIntersection=i=>{const t=i.filter((i=>i.isIntersecting));const e=i.filter((i=>!i.isIntersecting));if(this.isFirstIntersectionCheck){this.overflowCutoff=t.length}else{this.overflowCutoff=this.overflowCutoff+t.length-e.length}this.isFirstIntersectionCheck=false};this.actions=[];this.language=document.documentElement.lang;this.accessibleLabel=undefined;this.layout=undefined;this.collapsible=false;this.openDirection=undefined;this.overflowCutoff=this.actions.length;this.actionBarIsShrunk=false}connectedCallback(){if(this.hasRendered){this.createIntersectionObserver()}}componentDidRender(){var i;if(this.haveItemsChanged()){(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.createIntersectionObserver()}}disconnectedCallback(){var i;(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.intersectionObserver=undefined;this.actionBarItems=[]}render(){this.hasRendered=true;let i=[];if(this.actions.length>0){i=this.actions.slice(this.overflowCutoff)}return e(s,{"aria-label":this.accessibleLabel,class:{"is-full-width":this.layout==="fullWidth","is-floating":this.layout==="floating","is-shrunk":this.actionBarIsShrunk&&this.collapsible,"can-be-shrunk":!!this.collapsible},role:"grid"},e("div",{class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i),this.renderCollapseExpandButton())}renderCollapseExpandButton(){if(!this.collapsible||this.actions.length<=1){return}return e("button",{class:{"expand-shrink":true},"aria-label":this.tooltipLabel,type:"button",onClick:this.handleCollapseExpandClick},e("limel-icon",{name:"double_left",id:"tooltip-expand-shrink-button"}),e("limel-tooltip",{label:this.tooltipLabel,elementId:"tooltip-expand-shrink-button"}))}isVisible(i){return i<this.overflowCutoff}get tooltipLabel(){let i="action-bar.collapse";if(this.actionBarIsShrunk){i="action-bar.expand"}return this.getTranslation(i)}createIntersectionObserver(){const i={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i);for(const i of this.host.shadowRoot.querySelectorAll("limel-action-bar-item")){this.observe(i)}}observe(i){this.intersectionObserver.observe(i);this.actionBarItems.push(i)}haveItemsChanged(){const i=this.actionBarItems.some((i=>!this.host.shadowRoot.contains(i)));const t=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((i=>!this.actionBarItems.includes(i)));return i||t}get host(){return n(this)}};c.style=h;const d=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";const m=class{constructor(e){i(this,e);this.cancel=t(this,"cancel",7);this.save=t(this,"save",7);this.linkChange=t(this,"linkChange",7);this.getTranslation=i=>r.get(i,this.language);this.isValid=i=>{try{new URL(i)}catch(i){return false}return true};this.handleKeyDown=i=>{var t;if(i.key!==o){return}if(this.saveButton){this.saveButton.focus()}i.preventDefault();if(this.isValid((t=this.link)===null||t===void 0?void 0:t.href)){this.handleSave(i)}};this.handleCancel=i=>{if(i instanceof KeyboardEvent&&i.key!==l){return}i.stopPropagation();i.preventDefault();this.cancel.emit()};this.handleSave=i=>{i.stopPropagation();this.save.emit()};this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank");i.stopPropagation()};this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,(t=this.link)===null||t===void 0?void 0:t.href)};this.handleLinkValueChange=i=>{var t;const e=i.detail;this.emitLinkChange((t=this.link)===null||t===void 0?void 0:t.text,e)};this.emitLinkChange=(i,t)=>{const e={text:i,href:t};this.linkChange.emit(e)};this.link=undefined;this.language="en";this.isOpen=false}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){if(this.isOpen){document.addEventListener("keyup",this.handleCancel)}}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");if(i){requestAnimationFrame((()=>{i.focus()}))}}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{label:this.getTranslation("editor-link-menu.text"),value:((i=this.link)===null||i===void 0?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{label:this.getTranslation("editor-link-menu.link"),value:((t=this.link)===null||t===void 0?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{class:"actions"},e("limel-button",{label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{primary:true,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};m.style=d;export{c as limel_action_bar,m as limel_text_editor_link_menu};
2
+ //# sourceMappingURL=p-3311eaf3.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e,g as r}from"./p-288f0842.js";import{t as a}from"./p-4c88e5d3.js";import{c as s}from"./p-ad52787a.js";class o{constructor(){this.snackbarElements=[]}add(t){const i=this.getPopover(t);i===null||i===void 0?void 0:i.showPopover();this.snackbarElements=[t,...this.snackbarElements];this.emitOffsets()}remove(t){const i=this.getPopover(t);i===null||i===void 0?void 0:i.hidePopover();this.snackbarElements=this.snackbarElements.filter((i=>i!==t));this.emitOffsets()}emitOffsets(){let t=0;for(const i of this.snackbarElements){i.dispatchEvent(new CustomEvent("changeOffset",{detail:t}));t+=this.getPopover(i).getBoundingClientRect().height}}getPopover(t){return t.shadowRoot.querySelector("[popover]")}}const n="*{box-sizing:border-box}aside{background:none;border:none;inset:unset;overflow:visible;padding:0.5rem 0.5rem 0 0.5rem;right:0;width:var(--limel-snackbar-width, 21rem);top:calc(var(--snackbar-distance-to-top-edge) + env(safe-area-inset-top, 0));transition:opacity var(--limel-snackbar-opacity-transition-speed, 0.2s) ease, top var(--limel-snackbar-top-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89), transform var(--limel-snackbar-top-transition-speed, 0.46s) ease;transform:translate3d(0, 0, 0);opacity:1}aside.is-closing{transform:translate3d(2rem, 0, 0);opacity:0;--limel-snackbar-top-transition-speed:0.2s;--limel-snackbar-opacity-transition-speed:0.2s}.surface{overflow:hidden;padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.label{color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:var(--limel-theme-default-small-font-size);font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--limel-theme-on-surface-color:rgb(\n var(--contrast-100)\n );--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--lime-primary-color, var(--limel-theme-primary-color));--track-color:rgb(var(--contrast-800), 0.2);transition:opacity 0.1s ease, transform 0.1s ease;position:absolute;top:-0.375rem;left:-0.375rem;transform:scale(0.7);display:flex;align-items:center;justify-content:center}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}aside.open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}.dismiss .is-closing{transform:scale(0.5);opacity:0}.dismiss-button{transform:scale(0.8);margin:0;padding:0}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}.limel-portal--container{font-family:var(--limel-portal-font-family, inherit);opacity:0;display:none}.limel-portal--container.is-visible{opacity:1;display:inline-block}.limel-portal--container.is-visible>*{will-change:opacity, transform}@keyframes fade-in{from{opacity:0;transform:scale(0.94)}to{opacity:1;transform:scale(1) translate3d(0, 0, 0)}}@keyframes fade-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.94) translate3d(0, 0, 0)}}.limel-portal--container>*{animation:fade-in 0.18s cubic-bezier(0.11, 0.59, 0.18, 1.26) forwards}.limel-portal--container.is-hiding>*{animation:fade-out 0.22s ease forwards}.limel-portal--container[data-popper-placement=left-start]>*{transform-origin:right top}.limel-portal--container[data-popper-placement=left]>*{transform-origin:right center}.limel-portal--container[data-popper-placement=left-end]>*{transform-origin:right bottom}.limel-portal--container[data-popper-placement=top-start]>*{transform-origin:left bottom}.limel-portal--container[data-popper-placement=top]>*{transform-origin:center bottom}.limel-portal--container[data-popper-placement=top-end]>*{transform-origin:right bottom}.limel-portal--container[data-popper-placement=right-start]>*{transform-origin:left top}.limel-portal--container[data-popper-placement=right]>*{transform-origin:left center}.limel-portal--container[data-popper-placement=right-end]>*{transform-origin:left bottom}.limel-portal--container[data-popper-placement=bottom-start]>*{transform-origin:left top}.limel-portal--container[data-popper-placement=bottom]>*{transform-origin:center top}.limel-portal--container[data-popper-placement=bottom-end]>*{transform-origin:right top}";const l=new o;const c=300;const m=class{constructor(e){t(this,e);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.handleOpen=()=>{if(this.isOpen){return}this.isOpen=true;this.closing=false;l.add(this.host);if(this.timeout&&this.timeout!==-1){this.timeoutId=window.setTimeout(this.handleClose,Math.max(this.timeout-c,c))}};this.handleClose=()=>{if(!this.isOpen){return}this.closing=true;if(this.timeoutId){clearTimeout(this.timeoutId);this.timeoutId=undefined}setTimeout((()=>{this.isOpen=false;l.remove(this.host);this.hide.emit();this.offset=0}),c)};this.handleClickAction=()=>{this.action.emit()};this.open=false;this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.offset=0;this.isOpen=false;this.closing=true;this.snackbarId=s()}componentDidLoad(){if(this.open){requestAnimationFrame(this.handleOpen)}}onChangeIndex(t){t.stopPropagation();this.offset=t.detail}watchOpen(){if(this.open){this.handleOpen()}else{this.handleClose()}this.isOpen=this.open}async show(){console.warn("The `show` method in `limel-snackbar` is deprecated. Please use the `open` property instead.");if(!this.open){this.handleOpen()}}render(){return e("aside",{popover:"manual",style:{"--snackbar-timeout":`${Math.max(this.timeout||0,0)}ms`,"--snackbar-distance-to-top-edge":`${this.offset}px`},class:{open:this.open,"is-closing":this.closing,"limel-portal--parent":true},id:this.snackbarId,role:this.setAriaRoles(),"aria-relevant":this.open?"additions":undefined},e("div",{class:"surface","aria-atomic":"false"},e("div",{class:"label"},this.message),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}setAriaRoles(){if(!this.open){return}if(!this.timeout||this.timeout===-1){return"alertdialog"}return"status"}renderActions(t){if(!t){return}return e("div",{class:"actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return e("limel-button",{label:t,onClick:this.handleClickAction})}renderDismissButton(t){if(!t){return}const i=a.get("snackbar.dismiss",this.language);return e("div",{class:"dismiss"},this.renderTimeoutVisualization(),e("limel-icon-button",{class:"dismiss-button",icon:"multiply",label:i,onClick:this.handleClose,"aria-controls":this.snackbarId}))}renderTimeoutVisualization(){if(!this.timeout||this.timeout===-1){return}return e("svg",{width:"36",height:"36",viewBox:"0 0 36 36"},e("circle",{r:"18",cx:"18",cy:"18",fill:"var(--track-color)"}),e("path",{class:"track",d:"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0",stroke:"var(--fill-color)"}))}get host(){return r(this)}static get watchers(){return{open:["watchOpen"]}}};m.style=n;export{m as limel_snackbar};
2
- //# sourceMappingURL=p-aeba4aa4.entry.js.map
1
+ import{r as t,c as i,h as e,g as r}from"./p-288f0842.js";import{t as a}from"./p-5df2361b.js";import{c as s}from"./p-ad52787a.js";class o{constructor(){this.snackbarElements=[]}add(t){const i=this.getPopover(t);i===null||i===void 0?void 0:i.showPopover();this.snackbarElements=[t,...this.snackbarElements];this.emitOffsets()}remove(t){const i=this.getPopover(t);i===null||i===void 0?void 0:i.hidePopover();this.snackbarElements=this.snackbarElements.filter((i=>i!==t));this.emitOffsets()}emitOffsets(){let t=0;for(const i of this.snackbarElements){i.dispatchEvent(new CustomEvent("changeOffset",{detail:t}));t+=this.getPopover(i).getBoundingClientRect().height}}getPopover(t){return t.shadowRoot.querySelector("[popover]")}}const n="*{box-sizing:border-box}aside{background:none;border:none;inset:unset;overflow:visible;padding:0.5rem 0.5rem 0 0.5rem;right:0;width:var(--limel-snackbar-width, 21rem);top:calc(var(--snackbar-distance-to-top-edge) + env(safe-area-inset-top, 0));transition:opacity var(--limel-snackbar-opacity-transition-speed, 0.2s) ease, top var(--limel-snackbar-top-transition-speed, 0.46s) cubic-bezier(1, 0.09, 0, 0.89), transform var(--limel-snackbar-top-transition-speed, 0.46s) ease;transform:translate3d(0, 0, 0);opacity:1}aside.is-closing{transform:translate3d(2rem, 0, 0);opacity:0;--limel-snackbar-top-transition-speed:0.2s;--limel-snackbar-opacity-transition-speed:0.2s}.surface{overflow:hidden;padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.label{color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:var(--limel-theme-default-small-font-size);font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--limel-theme-on-surface-color:rgb(\n var(--contrast-100)\n );--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--lime-primary-color, var(--limel-theme-primary-color));--track-color:rgb(var(--contrast-800), 0.2);transition:opacity 0.1s ease, transform 0.1s ease;position:absolute;top:-0.375rem;left:-0.375rem;transform:scale(0.7);display:flex;align-items:center;justify-content:center}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}aside.open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}.dismiss .is-closing{transform:scale(0.5);opacity:0}.dismiss-button{transform:scale(0.8);margin:0;padding:0}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}.limel-portal--container{font-family:var(--limel-portal-font-family, inherit);opacity:0;display:none}.limel-portal--container.is-visible{opacity:1;display:inline-block}.limel-portal--container.is-visible>*{will-change:opacity, transform}@keyframes fade-in{from{opacity:0;transform:scale(0.94)}to{opacity:1;transform:scale(1) translate3d(0, 0, 0)}}@keyframes fade-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.94) translate3d(0, 0, 0)}}.limel-portal--container>*{animation:fade-in 0.18s cubic-bezier(0.11, 0.59, 0.18, 1.26) forwards}.limel-portal--container.is-hiding>*{animation:fade-out 0.22s ease forwards}.limel-portal--container[data-popper-placement=left-start]>*{transform-origin:right top}.limel-portal--container[data-popper-placement=left]>*{transform-origin:right center}.limel-portal--container[data-popper-placement=left-end]>*{transform-origin:right bottom}.limel-portal--container[data-popper-placement=top-start]>*{transform-origin:left bottom}.limel-portal--container[data-popper-placement=top]>*{transform-origin:center bottom}.limel-portal--container[data-popper-placement=top-end]>*{transform-origin:right bottom}.limel-portal--container[data-popper-placement=right-start]>*{transform-origin:left top}.limel-portal--container[data-popper-placement=right]>*{transform-origin:left center}.limel-portal--container[data-popper-placement=right-end]>*{transform-origin:left bottom}.limel-portal--container[data-popper-placement=bottom-start]>*{transform-origin:left top}.limel-portal--container[data-popper-placement=bottom]>*{transform-origin:center top}.limel-portal--container[data-popper-placement=bottom-end]>*{transform-origin:right top}";const l=new o;const c=300;const m=class{constructor(e){t(this,e);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.handleOpen=()=>{if(this.isOpen){return}this.isOpen=true;this.closing=false;l.add(this.host);if(this.timeout&&this.timeout!==-1){this.timeoutId=window.setTimeout(this.handleClose,Math.max(this.timeout-c,c))}};this.handleClose=()=>{if(!this.isOpen){return}this.closing=true;if(this.timeoutId){clearTimeout(this.timeoutId);this.timeoutId=undefined}setTimeout((()=>{this.isOpen=false;l.remove(this.host);this.hide.emit();this.offset=0}),c)};this.handleClickAction=()=>{this.action.emit()};this.open=false;this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.offset=0;this.isOpen=false;this.closing=true;this.snackbarId=s()}componentDidLoad(){if(this.open){requestAnimationFrame(this.handleOpen)}}onChangeIndex(t){t.stopPropagation();this.offset=t.detail}watchOpen(){if(this.open){this.handleOpen()}else{this.handleClose()}this.isOpen=this.open}async show(){console.warn("The `show` method in `limel-snackbar` is deprecated. Please use the `open` property instead.");if(!this.open){this.handleOpen()}}render(){return e("aside",{popover:"manual",style:{"--snackbar-timeout":`${Math.max(this.timeout||0,0)}ms`,"--snackbar-distance-to-top-edge":`${this.offset}px`},class:{open:this.open,"is-closing":this.closing,"limel-portal--parent":true},id:this.snackbarId,role:this.setAriaRoles(),"aria-relevant":this.open?"additions":undefined},e("div",{class:"surface","aria-atomic":"false"},e("div",{class:"label"},this.message),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}setAriaRoles(){if(!this.open){return}if(!this.timeout||this.timeout===-1){return"alertdialog"}return"status"}renderActions(t){if(!t){return}return e("div",{class:"actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return e("limel-button",{label:t,onClick:this.handleClickAction})}renderDismissButton(t){if(!t){return}const i=a.get("snackbar.dismiss",this.language);return e("div",{class:"dismiss"},this.renderTimeoutVisualization(),e("limel-icon-button",{class:"dismiss-button",icon:"multiply",label:i,onClick:this.handleClose,"aria-controls":this.snackbarId}))}renderTimeoutVisualization(){if(!this.timeout||this.timeout===-1){return}return e("svg",{width:"36",height:"36",viewBox:"0 0 36 36"},e("circle",{r:"18",cx:"18",cy:"18",fill:"var(--track-color)"}),e("path",{class:"track",d:"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0",stroke:"var(--fill-color)"}))}get host(){return r(this)}static get watchers(){return{open:["watchOpen"]}}};m.style=n;export{m as limel_snackbar};
2
+ //# sourceMappingURL=p-40542ccc.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SnackbarContainer","constructor","this","snackbarElements","add","snackbar","popover","getPopover","showPopover","emitOffsets","remove","hidePopover","filter","item","offset","dispatchEvent","CustomEvent","detail","getBoundingClientRect","height","shadowRoot","querySelector","snackbarCss","container","hideAnimationDuration","Snackbar","hostRef","handleOpen","isOpen","closing","host","timeout","timeoutId","window","setTimeout","handleClose","Math","max","clearTimeout","undefined","hide","emit","handleClickAction","action","snackbarId","createRandomString","componentDidLoad","open","requestAnimationFrame","onChangeIndex","event","stopPropagation","watchOpen","async","console","warn","render","h","style","class","id","role","setAriaRoles","message","renderActions","actionText","renderDismissButton","dismissible","renderActionButton","label","onClick","translate","get","language","renderTimeoutVisualization","icon","width","viewBox","r","cx","cy","fill","d","stroke"],"sources":["./src/components/snackbar/container.ts","./src/components/snackbar/snackbar.scss?tag=limel-snackbar&encapsulation=shadow","./src/components/snackbar/snackbar.tsx"],"sourcesContent":["/**\n * Container to keep track of all snackbar elements that gets added to the page.\n * When an element gets added or removed, the container will emit a\n * `changeOffset` event on all elements in the container, letting them know\n * the new offset to where they should position themselves.\n */\nexport class SnackbarContainer {\n private snackbarElements: HTMLLimelSnackbarElement[] = [];\n\n /**\n * Add a new element to the container\n *\n * @param snackbar - element to add\n */\n public add(snackbar: HTMLLimelSnackbarElement) {\n const popover = this.getPopover(snackbar);\n\n // @ts-expect-error Stencil does not seem to recognise the existance of showPopover\n popover?.showPopover();\n\n this.snackbarElements = [snackbar, ...this.snackbarElements];\n this.emitOffsets();\n }\n\n /**\n * Remove an element from the container\n *\n * @param snackbar - element to remove\n */\n public remove(snackbar: HTMLLimelSnackbarElement): void {\n const popover = this.getPopover(snackbar);\n\n // @ts-expect-error Stencil does not seem to recognise the existance of hidePopover\n popover?.hidePopover();\n\n this.snackbarElements = this.snackbarElements.filter(\n (item) => item !== snackbar\n );\n this.emitOffsets();\n }\n\n private emitOffsets() {\n let offset = 0;\n for (const snackbar of this.snackbarElements) {\n snackbar.dispatchEvent(\n new CustomEvent('changeOffset', {\n detail: offset,\n })\n );\n offset += this.getPopover(snackbar).getBoundingClientRect().height;\n }\n }\n\n private getPopover(snackbar: HTMLLimelSnackbarElement) {\n return snackbar.shadowRoot.querySelector('[popover]');\n }\n}\n","* {\n box-sizing: border-box;\n}\n\naside {\n background: none;\n border: none;\n inset: unset;\n overflow: visible;\n padding: 0.5rem 0.5rem 0 0.5rem;\n right: 0;\n\n width: var(--limel-snackbar-width, 21rem);\n top: calc(\n var(--snackbar-distance-to-top-edge) + env(safe-area-inset-top, 0)\n );\n\n transition:\n opacity var(--limel-snackbar-opacity-transition-speed, 0.2s) ease,\n top var(--limel-snackbar-top-transition-speed, 0.46s)\n cubic-bezier(1, 0.09, 0, 0.89),\n transform var(--limel-snackbar-top-transition-speed, 0.46s) ease;\n transform: translate3d(0, 0, 0);\n opacity: 1;\n\n &.is-closing {\n transform: translate3d(2rem, 0, 0);\n opacity: 0;\n --limel-snackbar-top-transition-speed: 0.2s;\n --limel-snackbar-opacity-transition-speed: 0.2s;\n }\n}\n\n.surface {\n overflow: hidden;\n\n padding: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 0.25rem;\n\n min-height: 3.25rem;\n border-radius: 0.75rem;\n\n background-color: rgb(var(--contrast-1400));\n box-shadow: var(--shadow-depth-8), var(--shadow-depth-16);\n}\n\n.label {\n color: rgb(var(--contrast-100));\n\n -webkit-font-smoothing: antialiased;\n font-size: var(--limel-theme-default-small-font-size);\n font-weight: 400;\n padding: 0 0.25rem;\n\n width: 100%;\n flex-grow: 1;\n}\n\n.actions {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n box-sizing: border-box;\n gap: 0.5rem;\n}\n\n.dismiss,\n.actions {\n --lime-elevated-surface-background-color: rgb(\n var(--contrast-1300)\n ); // background color of the buttons\n}\n\n.dismiss {\n --limel-theme-on-surface-color: rgb(\n var(--contrast-100)\n ); // color of the X icon\n --icon-background-color: var(--lime-elevated-surface-background-color);\n --fill-color: var(--lime-primary-color, var(--limel-theme-primary-color));\n --track-color: rgb(var(--contrast-800), 0.2);\n transition:\n opacity 0.1s ease,\n transform 0.1s ease;\n position: absolute;\n top: -0.375rem;\n left: -0.375rem;\n transform: scale(0.7);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n position: absolute;\n transform: rotate(90deg);\n fill: transparent;\n stroke-dasharray: 100;\n stroke-linecap: round;\n\n aside.open & {\n animation: timeout var(--snackbar-timeout) linear forwards;\n }\n }\n\n .is-closing {\n transform: scale(0.5);\n opacity: 0;\n }\n}\n\n.dismiss-button {\n transform: scale(0.8);\n margin: 0;\n padding: 0;\n}\n\n@keyframes timeout {\n 0% {\n stroke-width: 4;\n stroke-dashoffset: 0;\n opacity: 1;\n }\n 100% {\n stroke-width: 1;\n stroke-dashoffset: -100;\n opacity: 0.7;\n }\n}\n\n@import '../portal/partial-styles/portal-container.scss';\n","import { Languages } from '../date-picker/date.types';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport translate from '../../global/translations';\nimport { SnackbarContainer } from './container';\nimport { createRandomString } from '../../util/random-string';\n\nconst container = new SnackbarContainer();\nconst hideAnimationDuration = 300;\n\n/**\n * A Snackbar –also known as \"Toast\"– is used to inform the end user\n * about an action or a process in the system.\n * The information could vary from announcing that a process has just started,\n * is taking place now, has ended, or has been interrupted or canceled.\n *\n * The information that you provide using a snackbar should be:\n * - temporary\n * - contextual\n * - short\n * - and most importantly, ignorable.\n *\n * It means if the user misses the information, it shouldn't be a big deal.\n *\n * :::note\n * If the information you want to display has a higher importance or priority,\n * and you need to make sure that the user takes an action to dismiss it,\n * consider using the [Banner](#/component/limel-banner/) component instead.\n * For more complex interactions and for delivering more detailed information,\n * [Dialog](#/component/limel-dialog/) is a better choice.\n * :::\n *\n * @exampleComponent limel-example-snackbar\n * @exampleComponent limel-example-snackbar-with-action\n * @exampleComponent limel-example-snackbar-with-changing-messages\n * @exampleComponent limel-example-snackbar-dismissible\n * @exampleComponent limel-example-snackbar-persistent\n * @exampleComponent limel-example-snackbar-persistent-non-dismissible\n */\n@Component({\n tag: 'limel-snackbar',\n shadow: true,\n styleUrl: 'snackbar.scss',\n})\nexport class Snackbar {\n /**\n * `true` if the snackbar is open, `false` otherwise.\n */\n @Prop({ reflect: true })\n public open: boolean = false;\n\n /**\n * The text message to display.\n */\n @Prop()\n public message: string;\n\n /**\n * The amount of time in milliseconds to show the snackbar.\n * If set to `-1`, the snackbar will be persistent.\n * This means:\n * - either the end user will need to close it manually,\n * which requires the `dismissible` property to be set to `true`.\n * - or the snackbar needs to be closed programmatically.\n */\n @Prop({ reflect: true })\n public timeout?: number = 5000;\n\n /**\n * The text to display for the action button.\n */\n @Prop()\n public actionText: string;\n\n /**\n * When `true` displays a dismiss button on the snackbar,\n * allowing users to close it.\n */\n @Prop()\n public dismissible: boolean = true;\n\n /**\n * Whether to show the snackbar with space for multiple lines of text\n * @deprecated Setting this property no longer has any effect. The property will be removed in a future major version.\n */\n @Prop()\n public multiline: boolean;\n\n /**\n * Defines the language for translations.\n */\n @Prop()\n public language: Languages = 'en';\n\n @Element()\n private readonly host: HTMLLimelSnackbarElement;\n\n /**\n * Emitted when the action button is pressed\n */\n @Event()\n private readonly action: EventEmitter<void>;\n\n /**\n * Emitted when the snackbar hides itself\n */\n @Event()\n private readonly hide: EventEmitter<void>;\n\n @State()\n private offset: number = 0;\n\n @State()\n private isOpen: boolean = false;\n\n @State()\n private closing: boolean = true;\n\n private readonly snackbarId: string;\n private timeoutId?: number;\n\n public constructor() {\n this.snackbarId = createRandomString();\n }\n\n public componentDidLoad() {\n if (this.open) {\n requestAnimationFrame(this.handleOpen);\n }\n }\n\n @Listen('changeOffset')\n protected onChangeIndex(event: CustomEvent<number>) {\n event.stopPropagation();\n this.offset = event.detail;\n }\n\n @Watch('open')\n protected watchOpen() {\n if (this.open) {\n this.handleOpen();\n } else {\n this.handleClose();\n }\n\n this.isOpen = this.open;\n }\n\n /**\n * Show the snackbar\n * @deprecated Use the `open` property instead.\n */\n @Method()\n public async show() {\n console.warn(\n 'The `show` method in `limel-snackbar` is deprecated. Please use the `open` property instead.'\n );\n if (!this.open) {\n this.handleOpen();\n }\n }\n\n public handleOpen = () => {\n if (this.isOpen) {\n return;\n }\n\n this.isOpen = true;\n this.closing = false;\n container.add(this.host);\n\n if (this.timeout && this.timeout !== -1) {\n this.timeoutId = window.setTimeout(\n this.handleClose,\n Math.max(\n this.timeout - hideAnimationDuration,\n hideAnimationDuration\n )\n );\n }\n };\n\n private readonly handleClose = () => {\n if (!this.isOpen) {\n return;\n }\n\n this.closing = true;\n\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n this.timeoutId = undefined;\n }\n\n setTimeout(() => {\n this.isOpen = false;\n container.remove(this.host);\n this.hide.emit();\n this.offset = 0;\n }, hideAnimationDuration);\n };\n\n public render() {\n return (\n <aside\n popover=\"manual\"\n style={{\n '--snackbar-timeout': `${Math.max(this.timeout || 0, 0)}ms`,\n '--snackbar-distance-to-top-edge': `${this.offset}px`,\n }}\n class={{\n open: this.open,\n 'is-closing': this.closing,\n 'limel-portal--parent': true,\n }}\n id={this.snackbarId}\n role={this.setAriaRoles()}\n aria-relevant={this.open ? 'additions' : undefined}\n >\n <div class=\"surface\" aria-atomic=\"false\">\n <div class=\"label\">{this.message}</div>\n {this.renderActions(this.actionText)}\n {this.renderDismissButton(this.dismissible)}\n </div>\n </aside>\n );\n }\n\n private setAriaRoles() {\n if (!this.open) {\n return;\n }\n\n if (!this.timeout || this.timeout === -1) {\n return 'alertdialog';\n }\n\n return 'status';\n }\n\n private readonly handleClickAction = () => {\n this.action.emit();\n };\n\n private renderActions(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <div class=\"actions\" aria-atomic=\"true\">\n {this.renderActionButton(actionText)}\n </div>\n );\n }\n\n private renderActionButton(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <limel-button label={actionText} onClick={this.handleClickAction} />\n );\n }\n\n private renderDismissButton(dismissible: boolean) {\n if (!dismissible) {\n return;\n }\n\n const label = translate.get('snackbar.dismiss', this.language);\n\n return (\n <div class=\"dismiss\">\n {this.renderTimeoutVisualization()}\n <limel-icon-button\n class=\"dismiss-button\"\n icon=\"multiply\"\n label={label}\n onClick={this.handleClose}\n aria-controls={this.snackbarId}\n />\n </div>\n );\n }\n\n private renderTimeoutVisualization() {\n if (!this.timeout || this.timeout === -1) {\n return;\n }\n\n return (\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\n <circle r=\"18\" cx=\"18\" cy=\"18\" fill=\"var(--track-color)\" />\n <path\n class=\"track\"\n d=\"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0\"\n stroke=\"var(--fill-color)\"\n />\n </svg>\n );\n }\n}\n"],"mappings":"uIAMaA,EAAbC,cACYC,KAAAC,iBAA+C,E,CAOhDC,IAAIC,GACP,MAAMC,EAAUJ,KAAKK,WAAWF,GAGhCC,IAAO,MAAPA,SAAO,SAAPA,EAASE,cAETN,KAAKC,iBAAmB,CAACE,KAAaH,KAAKC,kBAC3CD,KAAKO,a,CAQFC,OAAOL,GACV,MAAMC,EAAUJ,KAAKK,WAAWF,GAGhCC,IAAO,MAAPA,SAAO,SAAPA,EAASK,cAETT,KAAKC,iBAAmBD,KAAKC,iBAAiBS,QACzCC,GAASA,IAASR,IAEvBH,KAAKO,a,CAGDA,cACJ,IAAIK,EAAS,EACb,IAAK,MAAMT,KAAYH,KAAKC,iBAAkB,CAC1CE,EAASU,cACL,IAAIC,YAAY,eAAgB,CAC5BC,OAAQH,KAGhBA,GAAUZ,KAAKK,WAAWF,GAAUa,wBAAwBC,M,EAI5DZ,WAAWF,GACf,OAAOA,EAASe,WAAWC,cAAc,Y,ECtDjD,MAAMC,EAAc,uvHCiBpB,MAAMC,EAAY,IAAIvB,EACtB,MAAMwB,EAAwB,I,MAoCjBC,EAAQ,MA6EjBx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88e5d3.js";function r(t,e){const i=t||e;if(!i){return"unknown"}const o=i.split(".").pop().toLowerCase();const s={pdf:"pdf",jpg:"image",jpeg:"image",heic:"image",bmp:"image",png:"image",gif:"image",svg:"image",svgz:"image",ep:"image",eps:"image",avi:"video",flv:"video",h264:"video",mov:"video",mp4:"video",mwv:"video",mkv:"video",mp3:"audio",wav:"audio",wma:"audio",ogg:"audio",txt:"text",json:"text",html:"text",xml:"text",doc:"office",docx:"office",odt:"office",dot:"office",dotx:"office",docm:"office",dotm:"office",pot:"office",ppt:"office",pptx:"office",odp:"office",potx:"office",potm:"office",pps:"office",ppsx:"office",ppsm:"office",pptm:"office",ppam:"office",pages:"office",xls:"office",xlsx:"office",xlsm:"office",xlsb:"office",ods:"office",csv:"office",numbers:"office"};return s[o]||"unknown"}class n{constructor(t){this.requestFullscreen=()=>{if(this.enter){this.enter()}};this.exitFullscreen=()=>{if(this.exit){this.exit.bind(window.document)()}};this.toggle=()=>{const t=window.document;const e=t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement;if(e){this.exitFullscreen()}else{this.requestFullscreen()}};this.enter=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen;this.enter=this.enter.bind(t);const e=window.document;this.exit=e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen}isSupported(){return!!this.requestFullscreen}}const l='@charset "UTF-8";:host{isolation:isolate;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%}*{box-sizing:border-box}img,video,audio,object,iframe{max-height:100%;max-width:100%;box-sizing:border-box}iframe{border:none;width:100%;height:100%;min-height:20rem}img{min-width:7rem;object-fit:contain}video{width:100%;height:auto}audio{width:100%}object{width:100%;height:100%}object[type="application/pdf"]{min-height:20rem}object[type="text/plain"]{border-radius:0.25rem;padding-right:2rem;overflow-y:auto}:host(:fullscreen){background-color:rgb(var(--color-gray-darker))}:host(:fullscreen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}:host(:-webkit-full-screen){background-color:rgb(var(--color-gray-darker))}:host(:-webkit-full-screen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}.buttons{position:absolute;z-index:1;top:0.25rem;right:0.25rem;display:flex;flex-direction:column;gap:0.25rem}@media (pointer: coarse){.buttons{gap:0.5rem}}.no-support{display:flex;flex-direction:column;gap:0.5rem;align-items:center;border:1px dashed rgb(var(--contrast-600));border-radius:0.5rem;padding:1.25rem}.no-support h1,.no-support p{margin:0}[class^=button--]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);display:flex;align-items:center;justify-content:center;border-radius:50%;width:2rem;height:2rem;background-color:rgba(var(--contrast-100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}[class^=button--]:hover,[class^=button--]:focus,[class^=button--]:focus-visible{will-change:color, background-color, box-shadow, transform}[class^=button--]:hover,[class^=button--]:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}[class^=button--]:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}[class^=button--]:hover,[class^=button--]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}[class^=button--]:focus{outline:none}[class^=button--]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}[class^=button--] limel-icon{transition:color 0.2s ease;width:1.25rem;color:rgb(var(--contrast-1200))}[class^=button--]:hover limel-icon{color:rgb(var(--contrast-1400))}.action-menu-for-pdf-files,.action-menu-for-office-files{position:absolute;right:0.75rem}.action-menu-for-pdf-files{bottom:0.75rem}.action-menu-for-office-files{top:0.75rem}';const a=class{constructor(o){t(this,o);this.action=e(this,"action",7);this.renderPdf=()=>[i("div",{class:"action-menu-for-pdf-files"},this.renderActionMenu()),i("iframe",{src:this.sanitizeUrl(this.fileUrl),loading:"lazy"})];this.renderImage=()=>[this.renderButtons(),i("img",{src:this.sanitizeUrl(this.fileUrl),alt:this.alt,loading:"lazy"})];this.renderVideo=()=>i("video",{controls:true},i("source",{src:this.sanitizeUrl(this.fileUrl)}));this.renderAudio=()=>i("audio",{controls:true},i("source",{src:this.sanitizeUrl(this.fileUrl)}));this.renderText=()=>{const t=[this.renderNoFileSupportMessage()];return[this.renderButtons(),i("object",{data:this.sanitizeUrl(this.fileUrl),type:"text/plain"},t)]};this.renderOffice=()=>[i("div",{class:"action-menu-for-office-files"},this.renderActionMenu()),i("iframe",{src:this.getOfficeViewerUrl()+encodeURIComponent(this.sanitizeUrl(this.fileUrl))+"&embedded=true",loading:"lazy"})];this.isOfficeFileAccessibleViaURL=()=>this.fileType==="office"&&!(this.fileUrl.startsWith("http://")||this.fileUrl.startsWith("https://"));this.getOfficeViewerUrl=()=>{const t={"microsoft-office":"https://view.officeapps.live.com/op/embed.aspx?src=","google-drive":"https://docs.google.com/gview?url="};return t[this.officeViewer]};this.renderNoFileSupportMessage=()=>i("div",{class:"no-support",role:"alert"},i("h1",null,"⚠️"),i("p",null,this.getTranslation("file-viewer.message.unsupported-filetype")),i("p",{style:{textAlign:"center",margin:"0 auto"}},this.getTranslation("file-viewer.message.try-other-options")),this.renderDownloadButton());this.renderButtons=()=>i("div",{class:"buttons"},this.renderActionMenu(),this.renderToggleFullscreenButton(),this.renderDownloadButton(),this.renderOpenInNewTabButton());this.renderToggleFullscreenButton=()=>{if(!this.allowFullscreen||!this.fullscreen.isSupported()){return}const t=this.isFullscreen?"multiply":"fit_to_width";const e=this.isFullscreen?this.getTranslation("file-viewer.exit-fullscreen"):this.getTranslation("file-viewer.open-in-fullscreen");return[i("button",{class:"button--toggle-fullscreen",id:"tooltip-toggle-fullscreen",role:"button",onClick:this.handleToggleFullscreen},i("limel-icon",{name:t}),i("limel-tooltip",{label:e,elementId:"tooltip-toggle-fullscreen",openDirection:"left"}))]};this.renderDownloadButton=()=>{var t;if(!this.allowDownload||this.isFullscreen){return}return i("a",{class:"button--download",id:"tooltip-download",role:"button",download:(t=this.filename)!==null&&t!==void 0?t:"",href:this.sanitizeUrl(this.fileUrl),target:"_blank"},i("limel-icon",{name:"download_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.download"),elementId:"tooltip-download",openDirection:"left"}))};this.renderOpenInNewTabButton=()=>{if(!this.allowOpenInNewTab||this.isFullscreen){return}return i("a",{class:"button--new-tab",id:"tooltip-new-tab",role:"button",href:this.sanitizeUrl(this.fileUrl),target:"_blank",rel:"noopener noreferrer"},i("limel-icon",{name:"external_link"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.open-in-new-tab"),elementId:"tooltip-new-tab",openDirection:"left"}))};this.renderActionMenu=()=>{if(!this.actions||this.isFullscreen){return}return i("limel-menu",{class:"action-menu",items:this.actions,onSelect:this.emitOnAction,"open-direction":"left"},i("button",{class:"button--action",id:"tooltip-more",role:"button",slot:"trigger"},i("limel-icon",{name:"menu_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.more-actions"),elementId:"tooltip-more",openDirection:"left"})))};this.createURL=async t=>{if(["pdf"].includes(t)){const t=await fetch(this.url);const e=await t.blob();this.fileUrl=URL.createObjectURL(e)}else{this.fileUrl=this.url}this.loading=false};this.handleToggleFullscreen=()=>{if(this.fullscreen.isSupported()){this.fullscreen.toggle();this.isFullscreen=!this.isFullscreen}};this.emitOnAction=t=>{t.stopPropagation();this.action.emit(t.detail)};this.url=undefined;this.filename=undefined;this.alt=undefined;this.allowFullscreen=false;this.allowOpenInNewTab=false;this.allowDownload=false;this.language="en";this.officeViewer="microsoft-office";this.actions=undefined;this.isFullscreen=false;this.fileType=undefined;this.loading=true;this.fileUrl="";this.fullscreen=new n(this.HostElement)}async componentWillLoad(){this.fileType=r(this.filename,this.url);await this.createURL(this.fileType)}render(){if(!this.isOfficeFileAccessibleViaURL){return this.renderNoFileSupportMessage()}if(this.loading){return i("limel-spinner",{size:"x-small",limeBranded:false})}return this.renderFileViewer()}async watchUrl(t,e){if(t===e){return}this.loading=true;this.fileType=r(this.filename,this.fileUrl);await this.createURL(this.fileType)}renderFileViewer(){const t={pdf:this.renderPdf,image:this.renderImage,video:this.renderVideo,audio:this.renderAudio,text:this.renderText,office:this.renderOffice};const e=t[this.fileType]||this.renderNoFileSupportMessage;return e()}sanitizeUrl(t){try{const e=new URL(t,window.location.href);const i=["http:","https:","blob:"];return i.includes(e.protocol)?e.href:""}catch(t){return""}}getTranslation(t){return s.get(t,this.language)}get HostElement(){return o(this)}static get watchers(){return{url:["watchUrl"]}}};a.style=l;export{a as limel_file_viewer};
2
- //# sourceMappingURL=p-d349e355.entry.js.map
1
+ import{r as t,c as e,h as i,g as o}from"./p-288f0842.js";import{t as s}from"./p-5df2361b.js";function r(t,e){const i=t||e;if(!i){return"unknown"}const o=i.split(".").pop().toLowerCase();const s={pdf:"pdf",jpg:"image",jpeg:"image",heic:"image",bmp:"image",png:"image",gif:"image",svg:"image",svgz:"image",ep:"image",eps:"image",avi:"video",flv:"video",h264:"video",mov:"video",mp4:"video",mwv:"video",mkv:"video",mp3:"audio",wav:"audio",wma:"audio",ogg:"audio",txt:"text",json:"text",html:"text",xml:"text",doc:"office",docx:"office",odt:"office",dot:"office",dotx:"office",docm:"office",dotm:"office",pot:"office",ppt:"office",pptx:"office",odp:"office",potx:"office",potm:"office",pps:"office",ppsx:"office",ppsm:"office",pptm:"office",ppam:"office",pages:"office",xls:"office",xlsx:"office",xlsm:"office",xlsb:"office",ods:"office",csv:"office",numbers:"office"};return s[o]||"unknown"}class n{constructor(t){this.requestFullscreen=()=>{if(this.enter){this.enter()}};this.exitFullscreen=()=>{if(this.exit){this.exit.bind(window.document)()}};this.toggle=()=>{const t=window.document;const e=t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement;if(e){this.exitFullscreen()}else{this.requestFullscreen()}};this.enter=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen;this.enter=this.enter.bind(t);const e=window.document;this.exit=e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen}isSupported(){return!!this.requestFullscreen}}const l='@charset "UTF-8";:host{isolation:isolate;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%}*{box-sizing:border-box}img,video,audio,object,iframe{max-height:100%;max-width:100%;box-sizing:border-box}iframe{border:none;width:100%;height:100%;min-height:20rem}img{min-width:7rem;object-fit:contain}video{width:100%;height:auto}audio{width:100%}object{width:100%;height:100%}object[type="application/pdf"]{min-height:20rem}object[type="text/plain"]{border-radius:0.25rem;padding-right:2rem;overflow-y:auto}:host(:fullscreen){background-color:rgb(var(--color-gray-darker))}:host(:fullscreen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}:host(:-webkit-full-screen){background-color:rgb(var(--color-gray-darker))}:host(:-webkit-full-screen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}.buttons{position:absolute;z-index:1;top:0.25rem;right:0.25rem;display:flex;flex-direction:column;gap:0.25rem}@media (pointer: coarse){.buttons{gap:0.5rem}}.no-support{display:flex;flex-direction:column;gap:0.5rem;align-items:center;border:1px dashed rgb(var(--contrast-600));border-radius:0.5rem;padding:1.25rem}.no-support h1,.no-support p{margin:0}[class^=button--]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);display:flex;align-items:center;justify-content:center;border-radius:50%;width:2rem;height:2rem;background-color:rgba(var(--contrast-100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}[class^=button--]:hover,[class^=button--]:focus,[class^=button--]:focus-visible{will-change:color, background-color, box-shadow, transform}[class^=button--]:hover,[class^=button--]:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}[class^=button--]:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}[class^=button--]:hover,[class^=button--]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}[class^=button--]:focus{outline:none}[class^=button--]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}[class^=button--] limel-icon{transition:color 0.2s ease;width:1.25rem;color:rgb(var(--contrast-1200))}[class^=button--]:hover limel-icon{color:rgb(var(--contrast-1400))}.action-menu-for-pdf-files,.action-menu-for-office-files{position:absolute;right:0.75rem}.action-menu-for-pdf-files{bottom:0.75rem}.action-menu-for-office-files{top:0.75rem}';const a=class{constructor(o){t(this,o);this.action=e(this,"action",7);this.renderPdf=()=>[i("div",{class:"action-menu-for-pdf-files"},this.renderActionMenu()),i("iframe",{src:this.sanitizeUrl(this.fileUrl),loading:"lazy"})];this.renderImage=()=>[this.renderButtons(),i("img",{src:this.sanitizeUrl(this.fileUrl),alt:this.alt,loading:"lazy"})];this.renderVideo=()=>i("video",{controls:true},i("source",{src:this.sanitizeUrl(this.fileUrl)}));this.renderAudio=()=>i("audio",{controls:true},i("source",{src:this.sanitizeUrl(this.fileUrl)}));this.renderText=()=>{const t=[this.renderNoFileSupportMessage()];return[this.renderButtons(),i("object",{data:this.sanitizeUrl(this.fileUrl),type:"text/plain"},t)]};this.renderOffice=()=>[i("div",{class:"action-menu-for-office-files"},this.renderActionMenu()),i("iframe",{src:this.getOfficeViewerUrl()+encodeURIComponent(this.sanitizeUrl(this.fileUrl))+"&embedded=true",loading:"lazy"})];this.isOfficeFileAccessibleViaURL=()=>this.fileType==="office"&&!(this.fileUrl.startsWith("http://")||this.fileUrl.startsWith("https://"));this.getOfficeViewerUrl=()=>{const t={"microsoft-office":"https://view.officeapps.live.com/op/embed.aspx?src=","google-drive":"https://docs.google.com/gview?url="};return t[this.officeViewer]};this.renderNoFileSupportMessage=()=>i("div",{class:"no-support",role:"alert"},i("h1",null,"⚠️"),i("p",null,this.getTranslation("file-viewer.message.unsupported-filetype")),i("p",{style:{textAlign:"center",margin:"0 auto"}},this.getTranslation("file-viewer.message.try-other-options")),this.renderDownloadButton());this.renderButtons=()=>i("div",{class:"buttons"},this.renderActionMenu(),this.renderToggleFullscreenButton(),this.renderDownloadButton(),this.renderOpenInNewTabButton());this.renderToggleFullscreenButton=()=>{if(!this.allowFullscreen||!this.fullscreen.isSupported()){return}const t=this.isFullscreen?"multiply":"fit_to_width";const e=this.isFullscreen?this.getTranslation("file-viewer.exit-fullscreen"):this.getTranslation("file-viewer.open-in-fullscreen");return[i("button",{class:"button--toggle-fullscreen",id:"tooltip-toggle-fullscreen",role:"button",onClick:this.handleToggleFullscreen},i("limel-icon",{name:t}),i("limel-tooltip",{label:e,elementId:"tooltip-toggle-fullscreen",openDirection:"left"}))]};this.renderDownloadButton=()=>{var t;if(!this.allowDownload||this.isFullscreen){return}return i("a",{class:"button--download",id:"tooltip-download",role:"button",download:(t=this.filename)!==null&&t!==void 0?t:"",href:this.sanitizeUrl(this.fileUrl),target:"_blank"},i("limel-icon",{name:"download_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.download"),elementId:"tooltip-download",openDirection:"left"}))};this.renderOpenInNewTabButton=()=>{if(!this.allowOpenInNewTab||this.isFullscreen){return}return i("a",{class:"button--new-tab",id:"tooltip-new-tab",role:"button",href:this.sanitizeUrl(this.fileUrl),target:"_blank",rel:"noopener noreferrer"},i("limel-icon",{name:"external_link"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.open-in-new-tab"),elementId:"tooltip-new-tab",openDirection:"left"}))};this.renderActionMenu=()=>{if(!this.actions||this.isFullscreen){return}return i("limel-menu",{class:"action-menu",items:this.actions,onSelect:this.emitOnAction,"open-direction":"left"},i("button",{class:"button--action",id:"tooltip-more",role:"button",slot:"trigger"},i("limel-icon",{name:"menu_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.more-actions"),elementId:"tooltip-more",openDirection:"left"})))};this.createURL=async t=>{if(["pdf"].includes(t)){const t=await fetch(this.url);const e=await t.blob();this.fileUrl=URL.createObjectURL(e)}else{this.fileUrl=this.url}this.loading=false};this.handleToggleFullscreen=()=>{if(this.fullscreen.isSupported()){this.fullscreen.toggle();this.isFullscreen=!this.isFullscreen}};this.emitOnAction=t=>{t.stopPropagation();this.action.emit(t.detail)};this.url=undefined;this.filename=undefined;this.alt=undefined;this.allowFullscreen=false;this.allowOpenInNewTab=false;this.allowDownload=false;this.language="en";this.officeViewer="microsoft-office";this.actions=undefined;this.isFullscreen=false;this.fileType=undefined;this.loading=true;this.fileUrl="";this.fullscreen=new n(this.HostElement)}async componentWillLoad(){this.fileType=r(this.filename,this.url);await this.createURL(this.fileType)}render(){if(!this.isOfficeFileAccessibleViaURL){return this.renderNoFileSupportMessage()}if(this.loading){return i("limel-spinner",{size:"x-small",limeBranded:false})}return this.renderFileViewer()}async watchUrl(t,e){if(t===e){return}this.loading=true;this.fileType=r(this.filename,this.fileUrl);await this.createURL(this.fileType)}renderFileViewer(){const t={pdf:this.renderPdf,image:this.renderImage,video:this.renderVideo,audio:this.renderAudio,text:this.renderText,office:this.renderOffice};const e=t[this.fileType]||this.renderNoFileSupportMessage;return e()}sanitizeUrl(t){try{const e=new URL(t,window.location.href);const i=["http:","https:","blob:"];return i.includes(e.protocol)?e.href:""}catch(t){return""}}getTranslation(t){return s.get(t,this.language)}get HostElement(){return o(this)}static get watchers(){return{url:["watchUrl"]}}};a.style=l;export{a as limel_file_viewer};
2
+ //# sourceMappingURL=p-42e889d8.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["colorPickerCss","ColorPicker","this","shouldFocus","renderTooltip","readonly","tooltipLabel","h","label","elementId","renderPickerPalette","renderPickerTrigger","open","isOpen","openDirection","onClose","onPopoverClose","ref","setColorPickerPaletteElement","value","helperText","placeholder","invalid","onChange","handleChange","required","palette","columnCount","paletteColumnCount","manualInput","background","slot","style","role","onClick","openPopover","id","disabled","element","contentElement","event","stopPropagation","change","emit","detail","componentDidRender","_a","focus","render","Host"],"sources":["./src/components/color-picker/color-picker.scss?tag=limel-color-picker&encapsulation=shadow","./src/components/color-picker/color-picker.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/internal/shared_input-select-picker';\n@import './partial-styles/lime-admin-hack';\n\n:host(limel-color-picker) {\n display: grid;\n gap: 0.25rem;\n grid-template-columns: auto 1fr;\n}\n\nbutton[slot='trigger'] {\n all: unset;\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n width: shared_input-select-picker.$height-of-mdc-text-field;\n height: shared_input-select-picker.$height-of-mdc-text-field;\n\n border-radius: 0.5rem;\n\n &:not([disabled]):not([disabled='true']) {\n @include mixins.is-elevated-clickable();\n @include mixins.visualize-keyboard-focus();\n }\n\n &:before,\n &:after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n }\n\n &:before {\n @include mixins.add-chessboard-background();\n z-index: 0;\n }\n\n &:after {\n z-index: 1;\n box-shadow: 0 0 0 0.25rem rgb(var(--contrast-100)) inset;\n background: var(--background);\n }\n}\n\n:host([readonly]:not([readonly='false'])) {\n limel-input-field {\n transform: translateX(\n calc(\n #{shared_input-select-picker.$height-of-mdc-text-field} /\n 4 * -1\n )\n )\n translateY(\n calc(\n #{shared_input-select-picker.$height-of-mdc-text-field} / 4\n )\n );\n }\n}\n\n:host([readonly]:not([readonly='false'])),\n:host([disabled]:not([disabled='false'])) {\n button[slot='trigger'] {\n border: 1px solid rgba(var(--contrast-700), 0.65);\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Event,\n EventEmitter,\n Host,\n} from '@stencil/core';\nimport { FormComponent } from '../form/form.types';\nimport type { CustomColorSwatch } from './color-picker.types';\n\n/**\n * This component enables you to select a swatch from out color palette, simply\n * by clicking on it. You can then copy the css variable name of the chosen color\n * and use it where desired.\n *\n * The color picker can also show you a preview of any valid color name or color value.\n *\n * :::note\n * Make sure to read our [guidelines about usage of colors](/#/DesignGuidelines/color-system.md/) from our palette.\n * :::\n *\n * @exampleComponent limel-example-color-picker-basic\n * @exampleComponent limel-example-color-picker-custom-palette\n * @exampleComponent limel-example-color-picker-manual-input\n * @exampleComponent limel-example-color-picker-composite\n */\n@Component({\n tag: 'limel-color-picker',\n shadow: true,\n styleUrl: 'color-picker.scss',\n})\nexport class ColorPicker implements FormComponent {\n /**\n * Name or code of the chosen color\n */\n @Prop({ reflect: true })\n public value: string;\n\n /**\n * The label of the input field\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Helper text of the input field\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Displayed as tooltips when picker is hovered.\n */\n @Prop({ reflect: true })\n public tooltipLabel: string;\n\n /**\n * Set to `true` if a value is required\n */\n @Prop({ reflect: true })\n public required: boolean;\n\n /**\n * Set to `true` to disable the field.\n * Use `disabled` to indicate that the field can normally be interacted\n * with, but is currently disabled. This tells the user that if certain\n * requirements are met, the field may become enabled again.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Set to `true` to make the field read-only.\n * Use `readonly` when the field is only there to present the data it holds,\n * and will not become possible for the current user to edit.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * Set to `true` to indicate that the current value of the input field is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * The placeholder text shown inside the input field,\n * when the field is focused and empty.\n */\n @Prop({ reflect: true })\n public placeholder: string;\n\n /**\n * Set to `false` to disallow custom color values to be typed into the input field.\n * Setting this to `false` does not completely disable the color picker.\n * It will only allow users to pick from the provided color palette.\n */\n @Prop({ reflect: true })\n public manualInput = true;\n\n /**\n * An array of either color value strings, or objects with a `name` and a `value`,\n * which replaces the default palette. Any valid CSS color format is accepted as value\n * (HEX, RGB/A, HSL, HWB, color-mix(), named colors, etc.).\n */\n @Prop()\n public palette?: Array<string | CustomColorSwatch>;\n\n /**\n * Defines the number of columns in the color swatch grid.\n * If not provided, it will default to the number of colors in the palette;\n * but stops at a maximum of 25 columns.\n */\n @Prop({ reflect: true })\n public paletteColumnCount?: number;\n\n /**\n * Emits chosen value to the parent component\n */\n @Event()\n public change: EventEmitter<string>;\n\n @State()\n private isOpen = false;\n\n public componentDidRender() {\n if (this.shouldFocus && this.isOpen) {\n this.shouldFocus = false;\n this.contentElement?.focus();\n }\n }\n\n private contentElement?: HTMLLimelColorPickerPaletteElement;\n\n private shouldFocus = false;\n\n public render() {\n return (\n <Host>\n {this.renderTooltip()}\n {this.renderPickerPalette()}\n <limel-input-field\n label={this.label}\n helperText={this.helperText}\n value={this.value}\n onChange={this.handleChange}\n required={this.required}\n readonly={this.readonly}\n disabled={this.disabled || !this.manualInput}\n invalid={this.invalid}\n placeholder={this.placeholder}\n />\n </Host>\n );\n }\n private renderTooltip = () => {\n if (!this.readonly && this.tooltipLabel) {\n return (\n <limel-tooltip\n label={this.tooltipLabel}\n elementId=\"tooltip-button\"\n />\n );\n }\n };\n\n private renderPickerPalette = () => {\n if (this.readonly) {\n return this.renderPickerTrigger();\n }\n\n return (\n <limel-popover\n open={this.isOpen}\n openDirection=\"bottom-start\"\n onClose={this.onPopoverClose}\n >\n {this.renderPickerTrigger()}\n <limel-color-picker-palette\n ref={this.setColorPickerPaletteElement}\n value={this.value}\n label={this.label}\n helperText={this.helperText}\n placeholder={this.placeholder}\n invalid={this.invalid}\n onChange={this.handleChange}\n required={this.required}\n palette={this.palette as any}\n columnCount={this.paletteColumnCount}\n manualInput={this.manualInput}\n />\n </limel-popover>\n );\n };\n\n private renderPickerTrigger = () => {\n const background = this.value ? { '--background': this.value } : {};\n\n return (\n <button\n slot=\"trigger\"\n style={background}\n role=\"button\"\n onClick={this.openPopover}\n id=\"tooltip-button\"\n disabled={this.readonly || this.disabled}\n />\n );\n };\n\n private setColorPickerPaletteElement = (\n element: HTMLLimelColorPickerPaletteElement\n ) => {\n this.contentElement = element;\n };\n\n private openPopover = (event: MouseEvent) => {\n event.stopPropagation();\n this.isOpen = true;\n\n this.shouldFocus = this.isOpen;\n };\n\n private onPopoverClose = (event: CustomEvent) => {\n event.stopPropagation();\n this.isOpen = false;\n };\n\n private handleChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.change.emit(event.detail);\n };\n}\n"],"mappings":"yDAAA,MAAMA,EAAiB,8uI,MCiCVC,EAAW,M,wDAwGZC,KAAAC,YAAc,MAqBdD,KAAAE,cAAgB,KACpB,IAAKF,KAAKG,UAAYH,KAAKI,aAAc,CACrC,OACIC,EAAA,iBACIC,MAAON,KAAKI,aACZG,UAAU,kB,GAMlBP,KAAAQ,oBAAsB,KAC1B,GAAIR,KAAKG,SAAU,CACf,OAAOH,KAAKS,qB,CAGhB,OACIJ,EAAA,iBACIK,KAAMV,KAAKW,OACXC,cAAc,eACdC,QAASb,KAAKc,gBAEbd,KAAKS,sBACNJ,EAAA,8BACIU,IAAKf,KAAKgB,6BACVC,MAAOjB,KAAKiB,MACZX,MAAON,KAAKM,MACZY,WAAYlB,KAAKkB,WACjBC,YAAanB,KAAKmB,YAClBC,QAASpB,KAAKoB,QACdC,SAAUrB,KAAKsB,aACfC,SAAUvB,KAAKuB,SACfC,QAASxB,KAAKwB,QACdC,YAAazB,KAAK0B,mBAClBC,YAAa3B,KAAK2B,cAEV,EAIhB3B,KAAAS,oBAAsB,KAC1B,MAAMmB,EAAa5B,KAAKiB,MAAQ,CAAE,eAAgBjB,KAAKiB,OAAU,GAEjE,OACIZ,EAAA,UACIwB,KAAK,UACLC,MAAOF,EACPG,KAAK,SACLC,QAAShC,KAAKiC,YACdC,GAAG,iBACHC,SAAUnC,KAAKG,UAAYH,KAAKmC,UAClC,EAIFnC,KAAAgB,6BACJoB,IAEApC,KAAKqC,eAAiBD,CAAO,EAGzBpC,KAAAiC,YAAeK,IACnBA,EAAMC,kBACNvC,KAAKW,OAAS,KAEdX,KAAKC,YAAcD,KAAKW,MAAM,EAG1BX,KAAAc,eAAkBwB,IACtBA,EAAMC,kBACNvC,KAAKW,OAAS,KAAK,EAGfX,KAAAsB,aAAgBgB,IACpBA,EAAMC,kBACNvC,KAAKwC,OAAOC,KAAKH,EAAMI,OAAO,E,sIAlKhB,M,cAQA,M,aAOD,M,4CAeI,K,qEAyBJ,K,CAEVC,qB,MACH,GAAI3C,KAAKC,aAAeD,KAAKW,OAAQ,CACjCX,KAAKC,YAAc,OACnB2C,EAAA5C,KAAKqC,kBAAc,MAAAO,SAAA,SAAAA,EAAEC,O,EAQtBC,SACH,OACIzC,EAAC0C,EAAI,KACA/C,KAAKE,gBACLF,KAAKQ,sBACNH,EAAA,qBACIC,MAAON,KAAKM,MACZY,WAAYlB,KAAKkB,WACjBD,MAAOjB,KAAKiB,MACZI,SAAUrB,KAAKsB,aACfC,SAAUvB,KAAKuB,SACfpB,SAAUH,KAAKG,SACfgC,SAAUnC,KAAKmC,WAAanC,KAAK2B,YACjCP,QAASpB,KAAKoB,QACdD,YAAanB,KAAKmB,c"}
1
+ {"version":3,"names":["colorPickerCss","ColorPicker","this","shouldFocus","renderTooltip","readonly","tooltipLabel","h","label","elementId","renderPickerPalette","renderPickerTrigger","open","isOpen","openDirection","onClose","onPopoverClose","ref","setColorPickerPaletteElement","value","helperText","placeholder","invalid","onChange","handleChange","required","palette","columnCount","paletteColumnCount","manualInput","background","slot","style","role","onClick","openPopover","id","disabled","element","contentElement","event","stopPropagation","change","emit","detail","componentDidRender","_a","focus","render","Host"],"sources":["./src/components/color-picker/color-picker.scss?tag=limel-color-picker&encapsulation=shadow","./src/components/color-picker/color-picker.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/internal/shared_input-select-picker';\n@import './partial-styles/lime-admin-hack';\n\n:host(limel-color-picker) {\n display: grid;\n gap: 0.25rem;\n grid-template-columns: auto 1fr;\n}\n\nbutton[slot='trigger'] {\n all: unset;\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n width: shared_input-select-picker.$height-of-mdc-text-field;\n height: shared_input-select-picker.$height-of-mdc-text-field;\n\n border-radius: 0.5rem;\n\n &:not([disabled]):not([disabled='true']) {\n @include mixins.is-elevated-clickable();\n @include mixins.visualize-keyboard-focus();\n }\n\n &:before,\n &:after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n }\n\n &:before {\n @include mixins.add-chessboard-background();\n z-index: 0;\n }\n\n &:after {\n z-index: 1;\n box-shadow: 0 0 0 0.25rem rgb(var(--contrast-100)) inset;\n background: var(--background);\n }\n}\n\n:host([readonly]:not([readonly='false'])) {\n limel-input-field {\n transform: translateX(\n calc(\n #{shared_input-select-picker.$height-of-mdc-text-field} /\n 4 * -1\n )\n )\n translateY(\n calc(\n #{shared_input-select-picker.$height-of-mdc-text-field} / 4\n )\n );\n }\n}\n\n:host([readonly]:not([readonly='false'])),\n:host([disabled]:not([disabled='false'])) {\n button[slot='trigger'] {\n border: 1px solid rgba(var(--contrast-700), 0.65);\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Event,\n EventEmitter,\n Host,\n} from '@stencil/core';\nimport { FormComponent } from '../form/form.types';\nimport type { CustomColorSwatch } from './color-picker.types';\n\n/**\n * This component enables you to select a swatch from out color palette, simply\n * by clicking on it. You can then copy the css variable name of the chosen color\n * and use it where desired.\n *\n * The color picker can also show you a preview of any valid color name or color value.\n *\n * :::note\n * Make sure to read our [guidelines about usage of colors](#/DesignGuidelines/color-system.md/) from our palette.\n * :::\n *\n * @exampleComponent limel-example-color-picker-basic\n * @exampleComponent limel-example-color-picker-custom-palette\n * @exampleComponent limel-example-color-picker-manual-input\n * @exampleComponent limel-example-color-picker-composite\n */\n@Component({\n tag: 'limel-color-picker',\n shadow: true,\n styleUrl: 'color-picker.scss',\n})\nexport class ColorPicker implements FormComponent {\n /**\n * Name or code of the chosen color\n */\n @Prop({ reflect: true })\n public value: string;\n\n /**\n * The label of the input field\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Helper text of the input field\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Displayed as tooltips when picker is hovered.\n */\n @Prop({ reflect: true })\n public tooltipLabel: string;\n\n /**\n * Set to `true` if a value is required\n */\n @Prop({ reflect: true })\n public required: boolean;\n\n /**\n * Set to `true` to disable the field.\n * Use `disabled` to indicate that the field can normally be interacted\n * with, but is currently disabled. This tells the user that if certain\n * requirements are met, the field may become enabled again.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Set to `true` to make the field read-only.\n * Use `readonly` when the field is only there to present the data it holds,\n * and will not become possible for the current user to edit.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * Set to `true` to indicate that the current value of the input field is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * The placeholder text shown inside the input field,\n * when the field is focused and empty.\n */\n @Prop({ reflect: true })\n public placeholder: string;\n\n /**\n * Set to `false` to disallow custom color values to be typed into the input field.\n * Setting this to `false` does not completely disable the color picker.\n * It will only allow users to pick from the provided color palette.\n */\n @Prop({ reflect: true })\n public manualInput = true;\n\n /**\n * An array of either color value strings, or objects with a `name` and a `value`,\n * which replaces the default palette. Any valid CSS color format is accepted as value\n * (HEX, RGB/A, HSL, HWB, color-mix(), named colors, etc.).\n */\n @Prop()\n public palette?: Array<string | CustomColorSwatch>;\n\n /**\n * Defines the number of columns in the color swatch grid.\n * If not provided, it will default to the number of colors in the palette;\n * but stops at a maximum of 25 columns.\n */\n @Prop({ reflect: true })\n public paletteColumnCount?: number;\n\n /**\n * Emits chosen value to the parent component\n */\n @Event()\n public change: EventEmitter<string>;\n\n @State()\n private isOpen = false;\n\n public componentDidRender() {\n if (this.shouldFocus && this.isOpen) {\n this.shouldFocus = false;\n this.contentElement?.focus();\n }\n }\n\n private contentElement?: HTMLLimelColorPickerPaletteElement;\n\n private shouldFocus = false;\n\n public render() {\n return (\n <Host>\n {this.renderTooltip()}\n {this.renderPickerPalette()}\n <limel-input-field\n label={this.label}\n helperText={this.helperText}\n value={this.value}\n onChange={this.handleChange}\n required={this.required}\n readonly={this.readonly}\n disabled={this.disabled || !this.manualInput}\n invalid={this.invalid}\n placeholder={this.placeholder}\n />\n </Host>\n );\n }\n private renderTooltip = () => {\n if (!this.readonly && this.tooltipLabel) {\n return (\n <limel-tooltip\n label={this.tooltipLabel}\n elementId=\"tooltip-button\"\n />\n );\n }\n };\n\n private renderPickerPalette = () => {\n if (this.readonly) {\n return this.renderPickerTrigger();\n }\n\n return (\n <limel-popover\n open={this.isOpen}\n openDirection=\"bottom-start\"\n onClose={this.onPopoverClose}\n >\n {this.renderPickerTrigger()}\n <limel-color-picker-palette\n ref={this.setColorPickerPaletteElement}\n value={this.value}\n label={this.label}\n helperText={this.helperText}\n placeholder={this.placeholder}\n invalid={this.invalid}\n onChange={this.handleChange}\n required={this.required}\n palette={this.palette as any}\n columnCount={this.paletteColumnCount}\n manualInput={this.manualInput}\n />\n </limel-popover>\n );\n };\n\n private renderPickerTrigger = () => {\n const background = this.value ? { '--background': this.value } : {};\n\n return (\n <button\n slot=\"trigger\"\n style={background}\n role=\"button\"\n onClick={this.openPopover}\n id=\"tooltip-button\"\n disabled={this.readonly || this.disabled}\n />\n );\n };\n\n private setColorPickerPaletteElement = (\n element: HTMLLimelColorPickerPaletteElement\n ) => {\n this.contentElement = element;\n };\n\n private openPopover = (event: MouseEvent) => {\n event.stopPropagation();\n this.isOpen = true;\n\n this.shouldFocus = this.isOpen;\n };\n\n private onPopoverClose = (event: CustomEvent) => {\n event.stopPropagation();\n this.isOpen = false;\n };\n\n private handleChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.change.emit(event.detail);\n };\n}\n"],"mappings":"yDAAA,MAAMA,EAAiB,8uI,MCiCVC,EAAW,M,wDAwGZC,KAAAC,YAAc,MAqBdD,KAAAE,cAAgB,KACpB,IAAKF,KAAKG,UAAYH,KAAKI,aAAc,CACrC,OACIC,EAAA,iBACIC,MAAON,KAAKI,aACZG,UAAU,kB,GAMlBP,KAAAQ,oBAAsB,KAC1B,GAAIR,KAAKG,SAAU,CACf,OAAOH,KAAKS,qB,CAGhB,OACIJ,EAAA,iBACIK,KAAMV,KAAKW,OACXC,cAAc,eACdC,QAASb,KAAKc,gBAEbd,KAAKS,sBACNJ,EAAA,8BACIU,IAAKf,KAAKgB,6BACVC,MAAOjB,KAAKiB,MACZX,MAAON,KAAKM,MACZY,WAAYlB,KAAKkB,WACjBC,YAAanB,KAAKmB,YAClBC,QAASpB,KAAKoB,QACdC,SAAUrB,KAAKsB,aACfC,SAAUvB,KAAKuB,SACfC,QAASxB,KAAKwB,QACdC,YAAazB,KAAK0B,mBAClBC,YAAa3B,KAAK2B,cAEV,EAIhB3B,KAAAS,oBAAsB,KAC1B,MAAMmB,EAAa5B,KAAKiB,MAAQ,CAAE,eAAgBjB,KAAKiB,OAAU,GAEjE,OACIZ,EAAA,UACIwB,KAAK,UACLC,MAAOF,EACPG,KAAK,SACLC,QAAShC,KAAKiC,YACdC,GAAG,iBACHC,SAAUnC,KAAKG,UAAYH,KAAKmC,UAClC,EAIFnC,KAAAgB,6BACJoB,IAEApC,KAAKqC,eAAiBD,CAAO,EAGzBpC,KAAAiC,YAAeK,IACnBA,EAAMC,kBACNvC,KAAKW,OAAS,KAEdX,KAAKC,YAAcD,KAAKW,MAAM,EAG1BX,KAAAc,eAAkBwB,IACtBA,EAAMC,kBACNvC,KAAKW,OAAS,KAAK,EAGfX,KAAAsB,aAAgBgB,IACpBA,EAAMC,kBACNvC,KAAKwC,OAAOC,KAAKH,EAAMI,OAAO,E,sIAlKhB,M,cAQA,M,aAOD,M,4CAeI,K,qEAyBJ,K,CAEVC,qB,MACH,GAAI3C,KAAKC,aAAeD,KAAKW,OAAQ,CACjCX,KAAKC,YAAc,OACnB2C,EAAA5C,KAAKqC,kBAAc,MAAAO,SAAA,SAAAA,EAAEC,O,EAQtBC,SACH,OACIzC,EAAC0C,EAAI,KACA/C,KAAKE,gBACLF,KAAKQ,sBACNH,EAAA,qBACIC,MAAON,KAAKM,MACZY,WAAYlB,KAAKkB,WACjBD,MAAOjB,KAAKiB,MACZI,SAAUrB,KAAKsB,aACfC,SAAUvB,KAAKuB,SACfpB,SAAUH,KAAKG,SACfgC,SAAUnC,KAAKmC,WAAanC,KAAK2B,YACjCP,QAASpB,KAAKoB,QACdD,YAAanB,KAAKmB,c"}
@@ -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","invalid","undefined","event","stopPropagation","change","emit","connectedCallback","componentWillLoad","makeEnterClickable","host","componentDidLoad","element","shadowRoot","mdcSwitch","disconnectedCallback","removeEnterClickable","render","readonly","icon","name","color","defaultLabel","text","label","labels","readonlyLabels","id","fieldId","class","type","role","onClick","viewBox","d","htmlFor","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\n@use '@material/switch/styles';\n\n$scale-factor: 0.8;\n\n:host(limel-switch) {\n isolation: isolate;\n\n min-height: 1.75rem;\n\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\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(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-pressed-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-hover-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\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-top: 0.25rem;\n &:hover {\n --mdc-switch-handle-elevation: var(--button-shadow-hovered);\n }\n}\n\nlabel {\n padding-top: 0.25rem;\n font-size: var(--limel-theme-default-font-size);\n\n &:not(.disabled) {\n cursor: pointer;\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/_helper-text.scss';\n","import { MDCSwitch } from '@material/switch';\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 {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../util/make-enter-clickable';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\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 * @exampleComponent limel-example-switch-readonly\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 * The labels to use to clarify what kind of data is being visualized,\n * when the component is `readonly`.\n */\n @Prop()\n public readonlyLabels?: Array<Label<boolean>> = [];\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 if (this.readonly) {\n let icon: string | Icon = 'minus';\n if (this.value) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={this.value}\n aria-controls={\n this.helperText ? this.helperTextId : undefined\n }\n defaultLabel={{ text: this.label, icon: icon }}\n labels={this.readonlyLabels}\n />,\n this.renderHelperLine(),\n ];\n }\n\n return [\n <button\n id={this.fieldId}\n class={{\n 'mdc-switch': true,\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}\n onClick={this.handleClick}\n aria-controls={this.helperText ? this.helperTextId : undefined}\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={`${this.disabled ? 'disabled' : ''}`}\n htmlFor={this.fieldId}\n >\n {this.label}\n </label>,\n this.renderHelperLine(),\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 invalid={this.invalid}\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,EAAaM,IAAID,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uBAAwBS,KAAKT,OAEjCmJ,KAAK,SACLC,KAAK,SAAQ,eACC3I,KAAKT,MACnB2D,SAAUlD,KAAKkD,SACf0F,QAAS5I,KAAK+C,YAAW,gBACV/C,KAAK4G,WAAa5G,KAAKuG,aAAeO,WAErDH,EAAA,OAAK8B,MAAM,sBACX9B,EAAA,OAAK8B,MAAM,4BACP9B,EAAA,OAAK8B,MAAM,sBACP9B,EAAA,OAAK8B,MAAM,sBACP9B,EAAA,OAAK8B,MAAM,2BAEf9B,EAAA,OAAK8B,MAAM,uBACX9B,EAAA,OAAK8B,MAAM,qBACP9B,EAAA,OACI8B,MAAM,wCACNI,QAAQ,aAERlC,EAAA,QAAMmC,EAAE,yEAEZnC,EAAA,OACI8B,MAAM,yCACNI,QAAQ,aAERlC,EAAA,QAAMmC,EAAE,2BAM5BnC,EAAA,SACI8B,MAAO,GAAGzI,KAAKkD,SAAW,WAAa,KACvC6F,QAAS/I,KAAKwI,SAEbxI,KAAKoI,OAEVpI,KAAKyG,mB,CAKHuC,aAAalJ,GACnB,IAAKE,KAAK0H,UAAW,CACjB,M,CAGJ1H,KAAK0H,UAAUrE,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","invalid","undefined","event","stopPropagation","change","emit","connectedCallback","componentWillLoad","makeEnterClickable","host","componentDidLoad","element","shadowRoot","mdcSwitch","disconnectedCallback","removeEnterClickable","render","readonly","icon","name","color","defaultLabel","text","label","labels","readonlyLabels","id","fieldId","class","type","role","onClick","viewBox","d","htmlFor","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\n@use '@material/switch/styles';\n\n$scale-factor: 0.8;\n\n:host(limel-switch) {\n isolation: isolate;\n\n min-height: 1.75rem;\n\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\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(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-pressed-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\n --mdc-switch-selected-hover-track-color: var(\n --lime-primary-color,\n var(--limel-theme-primary-color)\n );\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-top: 0.25rem;\n &:hover {\n --mdc-switch-handle-elevation: var(--button-shadow-hovered);\n }\n}\n\nlabel {\n padding-top: 0.25rem;\n font-size: var(--limel-theme-default-font-size);\n\n &:not(.disabled) {\n cursor: pointer;\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/_helper-text.scss';\n","import { MDCSwitch } from '@material/switch';\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 {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../util/make-enter-clickable';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\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 * @exampleComponent limel-example-switch-readonly\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 * The labels to use to clarify what kind of data is being visualized,\n * when the component is `readonly`.\n */\n @Prop()\n public readonlyLabels?: Array<Label<boolean>> = [];\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 if (this.readonly) {\n let icon: string | Icon = 'minus';\n if (this.value) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={this.value}\n aria-controls={\n this.helperText ? this.helperTextId : undefined\n }\n defaultLabel={{ text: this.label, icon: icon }}\n labels={this.readonlyLabels}\n />,\n this.renderHelperLine(),\n ];\n }\n\n return [\n <button\n id={this.fieldId}\n class={{\n 'mdc-switch': true,\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}\n onClick={this.handleClick}\n aria-controls={this.helperText ? this.helperTextId : undefined}\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={`${this.disabled ? 'disabled' : ''}`}\n htmlFor={this.fieldId}\n >\n {this.label}\n </label>,\n this.renderHelperLine(),\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 invalid={this.invalid}\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,IAAK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iBAEjBtI,KAAKyG,mB,CAIb,MAAO,CACHE,EAAA,UACI4B,GAAIvI,KAAKwI,QACTC,MAAO,CACH,aAAc,KACd,0BAA2BzI,KAAKT,MAChC,uBAAwBS,KAAKT,OAEjCmJ,KAAK,SACLC,KAAK,SAAQ,eACC3I,KAAKT,MACnB2D,SAAUlD,KAAKkD,SACf0F,QAAS5I,KAAK+C,YAAW,gBACV/C,KAAK4G,WAAa5G,KAAKuG,aAAeO,WAErDH,EAAA,OAAK8B,MAAM,sBACX9B,EAAA,OAAK8B,MAAM,4BACP9B,EAAA,OAAK8B,MAAM,sBACP9B,EAAA,OAAK8B,MAAM,sBACP9B,EAAA,OAAK8B,MAAM,2BAEf9B,EAAA,OAAK8B,MAAM,uBACX9B,EAAA,OAAK8B,MAAM,qBACP9B,EAAA,OACI8B,MAAM,wCACNI,QAAQ,aAERlC,EAAA,QAAMmC,EAAE,yEAEZnC,EAAA,OACI8B,MAAM,yCACNI,QAAQ,aAERlC,EAAA,QAAMmC,EAAE,2BAM5BnC,EAAA,SACI8B,MAAO,GAAGzI,KAAKkD,SAAW,WAAa,KACvC6F,QAAS/I,KAAKwI,SAEbxI,KAAKoI,OAEVpI,KAAKyG,mB,CAKHuC,aAAalJ,GACnB,IAAKE,KAAK0H,UAAW,CACjB,M,CAGJ1H,KAAK0H,UAAUrE,SAAWvD,C"}
@@ -0,0 +1,2 @@
1
+ const e={remove:"Fjern",save:"Gem",cancel:"Annullér",loading:"Indlæser…",value:"Værdi","action-bar.collapse":"Skjul","action-bar.expand":"Vis","action-bar.actions":"Handlinger","callout.note":"Bemærk","callout.important":"Vigtig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","collapsible-section.open":"Åbn { header } sektion","collapsible-section.close":"Luk { header } sektion","date-picker.today":"Idag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","drag-handle.drag-handle":"Trækgreb","drag-handle.drag-to-reorder":"Træk for at omarrangere","chip-set.clear-all":"Ryd alle","snackbar.dismiss":"Luk","file.drag-and-drop-tips":"Træk & slip filen her, eller klik for at gennemse.","file-viewer.message.unsupported-filetype":"Kan ikke vise en forhåndsvisning af denne filtype.","file-viewer.message.try-other-options":"Hent filen eller åbn den i en ny fane.","file-viewer.download":"Hent","file-viewer.exit-fullscreen":"Afslut fuldskærm","file-viewer.open-in-fullscreen":"Åbn i fuld skærm","file-viewer.open-in-new-tab":"Åbn i en ny fane","file-viewer.more-actions":"Mere…","editor-menu.bold":"Fed","editor-menu.italic":"Kursiv","editor-menu.strikethrough":"Gennemstreget","editor-menu.h1":"Overskrift 1","editor-menu.h2":"Overskrift 2","editor-menu.h3":"Overskrift 3","editor-menu.bulleted-list":"Punktliste","editor-menu.numbered-list":"Nummereret liste","editor-menu.blockquote":"Blokcitat","editor-menu.link":"Tilføj link","editor-link-menu.text":"Tekst","editor-link-menu.link":"Link","editor-menu.code-block":"Kodeblok","editor-menu.code":"Kode","editor-image-view.loading":"Indlæser billede: { filename }...","editor-image-view.failed":"Noget gik galt med billede: { filename }","editor-image-view.success":"Billede: { filename } er klar","editor-image-view.resize-handle":"Træk til højre eller venstre for at ændre størrelsen på billedet","progress-bar":"Fremskridtsindikator","ai-avatar.label":"AI-avatar","ai-avatar.thinking":"tænker","table.select-all":"Vælg alle rækker","table.select-row":"Vælg denne række","profile-picture.remove":"Fjern valgt billede","profile-picture.unsupported-preview.title":"Ikke-understøttet billedformat","profile-picture.unsupported-preview.description":"Vi kan ikke vise det valgte billede i denne browser. Vælg venligst en anden billedfil."};const i={remove:"Entfernen",save:"Speichern",cancel:"Abbrechen",loading:"Laden…",value:"Wert","action-bar.collapse":"Einklappen","action-bar.expand":"Ausklappen","action-bar.actions":"Aktionen","callout.note":"Hinweis","callout.important":"Wichtig","callout.tip":"Tipp","callout.caution":"Vorsicht","callout.warning":"Warnung","collapsible-section.open":"{ header } Bereich öffnen","collapsible-section.close":"{ header } Bereich schließen","date-picker.today":"Heute","date-picker.month.heading":"Monat","date-picker.quarter.heading":"Quartal","date-picker.year.heading":"Jahr","drag-handle.drag-handle":"Ziehgriff","drag-handle.drag-to-reorder":"Zum Neuordnen ziehen","chip-set.clear-all":"Alles löschen","snackbar.dismiss":"Schließen","file.drag-and-drop-tips":"Ziehen Sie Ihre Datei hierher oder klicken Sie, um zu durchsuchen.","file-viewer.message.unsupported-filetype":"Für diesen Dateityp kann keine Vorschau angezeigt werden.","file-viewer.message.try-other-options":"Laden Sie die Datei herunter oder öffnen Sie sie in einem neuen Tab.","file-viewer.download":"Herunterladen","file-viewer.exit-fullscreen":"Vollbildmodus beenden","file-viewer.open-in-fullscreen":"Im Vollbildmodus öffnen","file-viewer.open-in-new-tab":"In einem neuen Tab öffnen","file-viewer.more-actions":"Mehr…","editor-menu.bold":"Fett","editor-menu.italic":"Kursiv","editor-menu.strikethrough":"Durchgestrichen","editor-menu.h1":"Überschrift 1","editor-menu.h2":"Überschrift 2","editor-menu.h3":"Überschrift 3","editor-menu.bulleted-list":"Aufzählungsliste","editor-menu.numbered-list":"Nummerierte Liste","editor-menu.blockquote":"Zitatblock","editor-menu.link":"Link","editor-link-menu.text":"Text","editor-link-menu.link":"Link","editor-menu.code-block":"Codeblock","editor-menu.code":"Code","editor-image-view.loading":"Lade Bild: { filename }...","editor-image-view.failed":"Beim Laden des Bildes ist etwas schief gelaufen: { filename }","editor-image-view.success":"Bild: { filename } ist bereit","editor-image-view.resize-handle":"Ziehen Sie nach rechts oder links, um die Größe des Bildes zu ändern.","progress-bar":"Fortschrittsbalken","ai-avatar.label":"KI-Avatar","ai-avatar.thinking":"denkt","table.select-all":"Alle Zeilen auswählen","table.select-row":"Diese Zeile auswählen","profile-picture.remove":"Ausgewähltes Bild entfernen","profile-picture.unsupported-preview.title":"Nicht unterstütztes Bildformat","profile-picture.unsupported-preview.description":"Wir können das ausgewählte Bild in diesem Browser nicht anzeigen. Bitte wählen Sie eine andere Bilddatei."};const r={remove:"Remove",save:"Save",cancel:"Cancel",loading:"Loading…",value:"Value","action-bar.collapse":"Collapse","action-bar.expand":"Expand","action-bar.actions":"Actions","callout.note":"Note","callout.important":"Important","callout.tip":"Tip","callout.caution":"Caution","callout.warning":"Warning","collapsible-section.open":"Open { header } section","collapsible-section.close":"Close { header } section","date-picker.today":"Today","date-picker.month.heading":"Month","date-picker.quarter.heading":"Quarter","date-picker.year.heading":"Year","drag-handle.drag-handle":"Drag handle","drag-handle.drag-to-reorder":"Drag to reorder","chip-set.clear-all":"Clear all","snackbar.dismiss":"Dismiss","file.drag-and-drop-tips":"Drag & drop your file here, or click to browse.","file-viewer.message.unsupported-filetype":"Cannot display a preview for this file type.","file-viewer.message.try-other-options":"Download the file or open it in a new tab.","file-viewer.download":"Download","file-viewer.exit-fullscreen":"Exit fullscreen","file-viewer.open-in-fullscreen":"Open in fullscreen","file-viewer.open-in-new-tab":"Open in a new tab","file-viewer.more-actions":"More…","editor-menu.bold":"Bold","editor-menu.italic":"Italic","editor-menu.strikethrough":"Strikethrough","editor-menu.h1":"Heading 1","editor-menu.h2":"Heading 2","editor-menu.h3":"Heading 3","editor-menu.bulleted-list":"Bulleted list","editor-menu.numbered-list":"Numbered list","editor-menu.blockquote":"Blockquote","editor-menu.link":"Link","editor-link-menu.text":"Text","editor-link-menu.link":"Link","editor-menu.code-block":"Code block","editor-menu.code":"Code","editor-image-view.loading":"Loading image: { filename }...","editor-image-view.failed":"Something went wrong with image: { filename }","editor-image-view.success":"Image: { filename } is ready","editor-image-view.resize-handle":"Drag to right or left to resize the image","progress-bar":"Progress bar","ai-avatar.label":"AI Avatar","ai-avatar.thinking":"thinking","table.select-all":"Select all rows","table.select-row":"Select this row","profile-picture.remove":"Remove selected picture","profile-picture.unsupported-preview.title":"Unsupported image format","profile-picture.unsupported-preview.description":"We cannot display the selected image in this browser. Please select a different image file."};const a={remove:"Poista",save:"Tallenna",cancel:"Peruuta",loading:"Ladataan…",value:"Arvo","action-bar.collapse":"Pienennä","action-bar.expand":"Laajenna","action-bar.actions":"Toiminnot","callout.note":"Huomio","callout.important":"Tärkeää","callout.tip":"Vinkki","callout.caution":"Varoitus","callout.warning":"Varoitus","collapsible-section.open":"Avaa { header } osio","collapsible-section.close":"Sulje { header } osio","date-picker.today":"Tänään","date-picker.month.heading":"Kuukausi","date-picker.quarter.heading":"Vuosineljännes","date-picker.year.heading":"Vuosi","drag-handle.drag-handle":"Raahauskahva","drag-handle.drag-to-reorder":"Raahaa järjestelläksesi","chip-set.clear-all":"Tyhjennä kaikki","snackbar.dismiss":"Sulje","file.drag-and-drop-tips":"Vedä & pudota tiedostosi tähän, tai napsauta selataksesi.","file-viewer.message.unsupported-filetype":"Esikatselua ei voi näyttää tälle tiedostotyypille.","file-viewer.message.try-other-options":"Lataa tiedosto tai avaa se uudessa välilehdessä.","file-viewer.download":"Ladata","file-viewer.exit-fullscreen":"Poistu koko näytöstä","file-viewer.open-in-fullscreen":"Avaa koko näytössä","file-viewer.open-in-new-tab":"Avaa uudella välilehdellä","file-viewer.more-actions":"Lisää…","editor-menu.bold":"Lihavoitu","editor-menu.italic":"Kursivoitu","editor-menu.strikethrough":"Yliviivaus","editor-menu.h1":"Otsikkotaso 1","editor-menu.h2":"Otsikkotaso 2","editor-menu.h3":"Otsikkotaso 3","editor-menu.bulleted-list":"Luettelomerkitty lista","editor-menu.numbered-list":"Numeroitu lista","editor-menu.blockquote":"Lohkoteksti","editor-menu.link":"Lisää linkki","editor-link-menu.text":"Teksti","editor-link-menu.link":"Linkki","editor-menu.code-block":"Koodilohko","editor-menu.code":"Koodi","editor-image-view.loading":"Ladataan kuvaa: { filename }...","editor-image-view.failed":"Jokin meni pieleen kuvan kanssa: { filename }","editor-image-view.success":"Kuva: { filename } on valmis","editor-image-view.resize-handle":"Vedä oikealle tai vasemmalle muuttaaksesi kuvan kokoa","progress-bar":"Edistymispalkki","ai-avatar.label":"Tekoälyavatar","ai-avatar.thinking":"ajattelee","table.select-all":"Valitse kaikki rivit","table.select-row":"Valitse tämä rivi","profile-picture.remove":"Poista valittu kuva","profile-picture.unsupported-preview.title":"Tiedostomuoto ei ole tuettu","profile-picture.unsupported-preview.description":"Emme voi näyttää valittua kuvaa tässä selaimessa. Valitse jokin toinen kuvatiedosto."};const t={remove:"Supprimer",save:"Enregistrer",cancel:"Annuler",loading:"Chargement…",value:"Valeur","action-bar.collapse":"Réduire","action-bar.expand":"Développer","action-bar.actions":"Actions","callout.note":"Note","callout.important":"Important","callout.tip":"Conseil","callout.caution":"Prudence","callout.warning":"Avertissement","collapsible-section.open":"Ouvrir la section { header }","collapsible-section.close":"Fermer la section { header }","date-picker.today":"Aujourd'hui","date-picker.month.heading":"Mois","date-picker.quarter.heading":"Trimestre","date-picker.year.heading":"Année","drag-handle.drag-handle":"Poignée de déplacement","drag-handle.drag-to-reorder":"Glissez pour réorganiser","chip-set.clear-all":"Tout effacer","snackbar.dismiss":"Fermer","file.drag-and-drop-tips":"Glissez-déposez votre fichier ici, ou cliquez pour parcourir.","file-viewer.message.unsupported-filetype":"Impossible d'afficher un aperçu pour ce type de fichier.","file-viewer.message.try-other-options":"Téléchargez le fichier ou ouvrez-le dans un nouvel onglet.","file-viewer.download":"Télécharger","file-viewer.exit-fullscreen":"Quitter le mode plein écran","file-viewer.open-in-fullscreen":"Ouvrir en plein écran","file-viewer.open-in-new-tab":"Ouvrir dans un nouvel onglet","file-viewer.more-actions":"Plus…","editor-menu.bold":"Gras","editor-menu.italic":"Italique","editor-menu.strikethrough":"Barré","editor-menu.h1":"Titre 1","editor-menu.h2":"Titre 2","editor-menu.h3":"Titre 3","editor-menu.bulleted-list":"Liste à puces","editor-menu.numbered-list":"Liste numérotée","editor-menu.blockquote":"Bloc de citation","editor-menu.link":"Lien","editor-link-menu.text":"Texte","editor-link-menu.link":"Lien","editor-menu.code-block":"Bloc de code","editor-menu.code":"Code","editor-image-view.loading":"Chargement de l'image: { filename }...","editor-image-view.failed":"Un problème est survenu avec l'image: { filename }","editor-image-view.success":"Image: { filename } est prête","editor-image-view.resize-handle":"Faites glisser vers la droite ou la gauche pour redimensionner l'image","progress-bar":"Barre de progression","ai-avatar.label":"Avatar IA","ai-avatar.thinking":"en réflexion","table.select-all":"Sélectionner toutes les lignes","table.select-row":"Sélectionner cette ligne","profile-picture.remove":"Supprimer l’image sélectionnée","profile-picture.unsupported-preview.title":"Format d'image non pris en charge","profile-picture.unsupported-preview.description":"Nous ne pouvons pas afficher l'image sélectionnée dans ce navigateur. Veuillez sélectionner un autre fichier image."};const n={remove:"Verwijder",save:"Opslaan",cancel:"Annuleren",loading:"Laden…",value:"Waarde","action-bar.collapse":"Inklappen","action-bar.expand":"Uitklappen","action-bar.actions":"Acties","callout.note":"Opmerking","callout.important":"Belangrijk","callout.tip":"Tip","callout.caution":"Waarschuwing","callout.warning":"Waarschuwing","collapsible-section.open":"Open { header } sectie","collapsible-section.close":"Sluit { header } sectie","date-picker.today":"Vandaag","date-picker.month.heading":"Maand","date-picker.quarter.heading":"Kwartaal","date-picker.year.heading":"Jaar","drag-handle.drag-handle":"Sleepgreep","drag-handle.drag-to-reorder":"Slepen om opnieuw te ordenen","chip-set.clear-all":"Alles wissen","snackbar.dismiss":"Sluiten","file.drag-and-drop-tips":"Sleep een bestand hierheen of klik om te bladeren.","file-viewer.message.unsupported-filetype":"Kan geen voorbeeld weergeven voor dit bestandstype.","file-viewer.message.try-other-options":"Download het bestand of open het in een nieuw tabblad.","file-viewer.download":"Downloaden","file-viewer.exit-fullscreen":"Verlaat volledig scherm","file-viewer.open-in-fullscreen":"Open in volledig scherm","file-viewer.open-in-new-tab":"Openen op een nieuw tabblad","file-viewer.more-actions":"Meer…","editor-menu.bold":"Vet","editor-menu.italic":"Cursief","editor-menu.strikethrough":"Doorhalen","editor-menu.h1":"Kopniveau 1","editor-menu.h2":"Kopniveau 2","editor-menu.h3":"Kopniveau 3","editor-menu.bulleted-list":"Opsomming","editor-menu.numbered-list":"Genummerde lijst","editor-menu.blockquote":"Blokcitaat","editor-menu.link":"Link toevoegen","editor-link-menu.text":"Tekst","editor-link-menu.link":"Link","editor-menu.code-block":"Codeblok","editor-menu.code":"Code","editor-image-view.loading":"Afbeelding wordt geladen: { filename }...","editor-image-view.failed":"Er is iets misgegaan met de afbeelding: { filename }","editor-image-view.success":"Afbeelding: { filename } is klaar","editor-image-view.resize-handle":"Sleep naar rechts of links om de afbeeldingsgrootte te veranderen","progress-bar":"Voortgangsbalk","ai-avatar.label":"AI-avatar","ai-avatar.thinking":"aan het denken","table.select-all":"Alle rijen selecteren","table.select-row":"Deze rij selecteren","profile-picture.remove":"Geselecteerde afbeelding verwijderen","profile-picture.unsupported-preview.title":"Niet-ondersteund afbeeldingsformaat","profile-picture.unsupported-preview.description":"We kunnen de geselecteerde afbeelding niet weergeven in deze browser. Selecteer een ander afbeeldingsbestand."};const l={remove:"Fjerne",save:"Lagre",cancel:"Avbryt",loading:"Laster…",value:"Verdi","action-bar.collapse":"Skjul","action-bar.expand":"Vis","action-bar.actions":"Handlinger","callout.note":"Note","callout.important":"Viktig","callout.tip":"Tip","callout.caution":"Advarsel","callout.warning":"Advarsel","collapsible-section.open":"Åpne { header } seksjon","collapsible-section.close":"Lukk { header } seksjon","date-picker.today":"I dag","date-picker.month.heading":"Måned","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","drag-handle.drag-handle":"Dra-håndtak","drag-handle.drag-to-reorder":"Dra for å omorganisere","chip-set.clear-all":"Fjern alle","file.drag-and-drop-tips":"Dra & slipp filen her, eller klikk for å bla gjennom.","file-viewer.message.unsupported-filetype":"Kan ikke vise en forhåndsvisning av denne filtypen.","file-viewer.message.try-other-options":"Last ned filen eller åpne den i en ny fane.","file-viewer.download":"Nedlasting","file-viewer.exit-fullscreen":"Gå ut av fullskjerm","file-viewer.open-in-fullscreen":"Åpne i fullskjerm","file-viewer.open-in-new-tab":"Åpne i en ny fane","file-viewer.more-actions":"Mer…","editor-menu.bold":"Fet","editor-menu.italic":"Kursiv","editor-menu.strikethrough":"Gjennomstreking","editor-menu.h1":"Overskrift 1","editor-menu.h2":"Overskrift 2","editor-menu.h3":"Overskrifts 3","editor-menu.bulleted-list":"Punktliste","editor-menu.numbered-list":"Nummerert liste","editor-menu.blockquote":"Blokksitat","editor-menu.link":"Legg til lenke","editor-link-menu.text":"Tekst","editor-link-menu.link":"Lenke","editor-menu.code-block":"Kodeblokk","editor-menu.code":"Kode","editor-image-view.loading":"Laster bilde: { filename }...","editor-image-view.failed":"Noe gikk galt med bildet: { filename }","editor-image-view.success":"Bilde: { filename } er klart","editor-image-view.resize-handle":"Dra til høyre eller venstre for å endre størrelsen på bildet","progress-bar":"Fremdriftsindikator","snackbar.dismiss":"Lukk","ai-avatar.label":"KI-avatar","ai-avatar.thinking":"tenker","table.select-all":"Velg alle rader","table.select-row":"Velg denne raden","profile-picture.remove":"Fjern valgt bilde","profile-picture.unsupported-preview.title":"Ustøttet bildeformat","profile-picture.unsupported-preview.description":"Vi kan ikke vise det valgte bildet i denne nettleseren. Vennligst velg en annen bildefil."};const o={remove:"Ta bort",save:"Spara",cancel:"Avbryt",loading:"Laddar…",value:"Värde","action-bar.collapse":"Dölj","action-bar.expand":"Visa","action-bar.actions":"Åtgärder","callout.note":"Obs","callout.important":"Viktigt","callout.tip":"Tips","callout.caution":"Varning","callout.warning":"Varning","collapsible-section.open":"Öppna { header }-sektion","collapsible-section.close":"Stäng { header }-sektion","date-picker.today":"Idag","date-picker.month.heading":"Månad","date-picker.quarter.heading":"Kvartal","date-picker.year.heading":"År","drag-handle.drag-handle":"Draghandtag","drag-handle.drag-to-reorder":"Dra för att ändra ordning","chip-set.clear-all":"Rensa alla","snackbar.dismiss":"Stäng","file.drag-and-drop-tips":"Dra & släpp filen här eller klicka om du vill bläddra.","file-viewer.message.unsupported-filetype":"Kan inte visa en förhandsvisning för denna filtyp.","file-viewer.message.try-other-options":"Ladda ner filen eller öppna den i en ny flik.","file-viewer.download":"Ladda ner","file-viewer.exit-fullscreen":"Avsluta fullskärmsläge","file-viewer.open-in-fullscreen":"Öppna i fullskärmsläge","file-viewer.open-in-new-tab":"Öppna i ny flik","file-viewer.more-actions":"Mer…","editor-menu.bold":"Fet","editor-menu.italic":"Kursiv","editor-menu.strikethrough":"Genomstruken","editor-menu.h1":"Rubrik 1","editor-menu.h2":"Rubrik 2","editor-menu.h3":"Rubrik 3","editor-menu.bulleted-list":"Punktlista","editor-menu.numbered-list":"Numrerad lista","editor-menu.blockquote":"Blockcitat","editor-menu.link":"Lägg till länk","editor-link-menu.text":"Text","editor-link-menu.link":"Länk","editor-menu.code-block":"Kodblock","editor-menu.code":"Kod","editor-image-view.loading":"Laddar bilden: { filename }...","editor-image-view.failed":"Något gick fel med bilden: { filename }","editor-image-view.success":"Bilden: { filename } är redo","editor-image-view.resize-handle":"Dra åt höger eller vänster för att ändra storlek på bilden","progress-bar":"Förloppsindikator","ai-avatar.label":"AI-avatar","ai-avatar.thinking":"tänker","table.select-all":"Markera alla rader","table.select-row":"Markera denna rad","profile-picture.remove":"Ta bort vald bild","profile-picture.unsupported-preview.title":"Formatet stöds inte","profile-picture.unsupported-preview.description":"Vi kan inte visa den valda bilden i den här webbläsaren. Välj en annan bildfil."};const d={da:e,de:i,en:r,fi:a,fr:t,no:l,nl:n,sv:o};const s=/\{\s*(\w+)\s*\}/g;class u{get(e,i="en",r){const a=d[i][e];if(!a){return e}return a.replaceAll(s,((e,i)=>r[i]||e))}}const c=new u;const p=(()=>c)();export{p as t};
2
+ //# sourceMappingURL=p-5df2361b.js.map