@limetech/lime-elements 37.55.4 → 37.55.6

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 (150) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-badge_3.cjs.entry.js +1 -4
  4. package/dist/cjs/limel-badge_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js +2 -4
  6. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js.map +1 -1
  7. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-callout.cjs.entry.js.map +1 -1
  9. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-date-picker.cjs.entry.js +6 -6
  11. package/dist/cjs/limel-date-picker.cjs.entry.js.map +1 -1
  12. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +5 -2
  13. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -1
  14. package/dist/cjs/limel-form.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  16. package/dist/cjs/limel-icon_2.cjs.entry.js +16 -54
  17. package/dist/cjs/limel-icon_2.cjs.entry.js.map +1 -1
  18. package/dist/cjs/limel-picker.cjs.entry.js +1 -2
  19. package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
  20. package/dist/cjs/limel-popover_2.cjs.entry.js +4 -35
  21. package/dist/cjs/limel-popover_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +7 -7
  23. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  24. package/dist/cjs/limel-select.cjs.entry.js +4 -5
  25. package/dist/cjs/limel-select.cjs.entry.js.map +1 -1
  26. package/dist/cjs/limel-snackbar.cjs.entry.js +92 -523
  27. package/dist/cjs/limel-snackbar.cjs.entry.js.map +1 -1
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/collection/components/callout/callout.helpers.js +1 -1
  30. package/dist/collection/components/callout/callout.helpers.js.map +1 -1
  31. package/dist/collection/components/color-picker/color-picker.js +0 -1
  32. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  33. package/dist/collection/components/date-picker/date-picker.css +0 -3
  34. package/dist/collection/components/date-picker/date-picker.js +6 -6
  35. package/dist/collection/components/date-picker/date-picker.js.map +1 -1
  36. package/dist/collection/components/form/widgets/code-editor.js +2 -2
  37. package/dist/collection/components/form/widgets/code-editor.js.map +1 -1
  38. package/dist/collection/components/input-field/input-field.js +1 -2
  39. package/dist/collection/components/input-field/input-field.js.map +1 -1
  40. package/dist/collection/components/list/list-renderer.js +2 -2
  41. package/dist/collection/components/list/list-renderer.js.map +1 -1
  42. package/dist/collection/components/menu/menu.css +0 -1
  43. package/dist/collection/components/menu/menu.js +1 -2
  44. package/dist/collection/components/menu/menu.js.map +1 -1
  45. package/dist/collection/components/menu-surface/menu-surface.js +3 -0
  46. package/dist/collection/components/menu-surface/menu-surface.js.map +1 -1
  47. package/dist/collection/components/picker/picker.css +0 -3
  48. package/dist/collection/components/picker/picker.js +1 -2
  49. package/dist/collection/components/picker/picker.js.map +1 -1
  50. package/dist/collection/components/popover/popover.css +0 -1
  51. package/dist/collection/components/popover/popover.js +4 -5
  52. package/dist/collection/components/popover/popover.js.map +1 -1
  53. package/dist/collection/components/portal/portal.css +10 -7
  54. package/dist/collection/components/portal/portal.js +22 -123
  55. package/dist/collection/components/portal/portal.js.map +1 -1
  56. package/dist/collection/components/select/select.css +0 -3
  57. package/dist/collection/components/select/select.js +2 -3
  58. package/dist/collection/components/select/select.js.map +1 -1
  59. package/dist/collection/components/select/select.template.js +1 -1
  60. package/dist/collection/components/select/select.template.js.map +1 -1
  61. package/dist/collection/components/snackbar/container.js +50 -0
  62. package/dist/collection/components/snackbar/container.js.map +1 -0
  63. package/dist/collection/components/snackbar/snackbar.css +37 -51
  64. package/dist/collection/components/snackbar/snackbar.js +66 -40
  65. package/dist/collection/components/snackbar/snackbar.js.map +1 -1
  66. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
  67. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
  68. package/dist/collection/components/tooltip/tooltip.css +0 -3
  69. package/dist/collection/components/tooltip/tooltip.js +1 -4
  70. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  71. package/dist/collection/index.js.map +1 -1
  72. package/dist/collection/style/internal/codemirror-tooltip.scss +0 -1
  73. package/dist/esm/lime-elements.js +1 -1
  74. package/dist/esm/limel-badge_3.entry.js +1 -4
  75. package/dist/esm/limel-badge_3.entry.js.map +1 -1
  76. package/dist/esm/limel-breadcrumbs_5.entry.js +2 -4
  77. package/dist/esm/limel-breadcrumbs_5.entry.js.map +1 -1
  78. package/dist/esm/limel-callout.entry.js +1 -1
  79. package/dist/esm/limel-callout.entry.js.map +1 -1
  80. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  81. package/dist/esm/limel-date-picker.entry.js +6 -6
  82. package/dist/esm/limel-date-picker.entry.js.map +1 -1
  83. package/dist/esm/limel-dynamic-label_4.entry.js +5 -2
  84. package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -1
  85. package/dist/esm/limel-form.entry.js +2 -2
  86. package/dist/esm/limel-form.entry.js.map +1 -1
  87. package/dist/esm/limel-icon_2.entry.js +17 -55
  88. package/dist/esm/limel-icon_2.entry.js.map +1 -1
  89. package/dist/esm/limel-picker.entry.js +1 -2
  90. package/dist/esm/limel-picker.entry.js.map +1 -1
  91. package/dist/esm/limel-popover_2.entry.js +4 -35
  92. package/dist/esm/limel-popover_2.entry.js.map +1 -1
  93. package/dist/esm/limel-prosemirror-adapter.entry.js +7 -7
  94. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  95. package/dist/esm/limel-select.entry.js +4 -5
  96. package/dist/esm/limel-select.entry.js.map +1 -1
  97. package/dist/esm/limel-snackbar.entry.js +92 -523
  98. package/dist/esm/limel-snackbar.entry.js.map +1 -1
  99. package/dist/esm/loader.js +1 -1
  100. package/dist/lime-elements/lime-elements.css +1 -1
  101. package/dist/lime-elements/lime-elements.esm.js +1 -1
  102. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  103. package/dist/lime-elements/p-04fc9578.entry.js +2 -0
  104. package/dist/lime-elements/p-04fc9578.entry.js.map +1 -0
  105. package/dist/lime-elements/{p-ed214c35.entry.js → p-36b385b2.entry.js} +2 -2
  106. package/dist/lime-elements/p-36b385b2.entry.js.map +1 -0
  107. package/dist/lime-elements/{p-d1838cf6.entry.js → p-39c678f7.entry.js} +2 -2
  108. package/dist/lime-elements/p-39c678f7.entry.js.map +1 -0
  109. package/dist/lime-elements/p-465c22b0.entry.js +2 -0
  110. package/dist/lime-elements/p-465c22b0.entry.js.map +1 -0
  111. package/dist/lime-elements/p-47f7d74f.entry.js.map +1 -1
  112. package/dist/lime-elements/p-48652dbe.entry.js.map +1 -1
  113. package/dist/lime-elements/p-4aa1d842.entry.js +68 -0
  114. package/dist/lime-elements/p-4aa1d842.entry.js.map +1 -0
  115. package/dist/lime-elements/p-50303eb1.entry.js.map +1 -1
  116. package/dist/lime-elements/p-e364c2b1.entry.js +2 -0
  117. package/dist/lime-elements/p-e364c2b1.entry.js.map +1 -0
  118. package/dist/lime-elements/{p-b8bfe44d.entry.js → p-e728ae13.entry.js} +2 -2
  119. package/dist/lime-elements/p-e728ae13.entry.js.map +1 -0
  120. package/dist/lime-elements/p-e7fc1c16.entry.js +2 -0
  121. package/dist/lime-elements/p-e7fc1c16.entry.js.map +1 -0
  122. package/dist/lime-elements/{p-773e3d4f.entry.js → p-f3ef8842.entry.js} +2 -2
  123. package/dist/lime-elements/p-f3ef8842.entry.js.map +1 -0
  124. package/dist/lime-elements/p-fec054fd.entry.js +2 -0
  125. package/dist/lime-elements/p-fec054fd.entry.js.map +1 -0
  126. package/dist/lime-elements/style/internal/codemirror-tooltip.scss +0 -1
  127. package/dist/types/components/list/list-renderer.d.ts +1 -1
  128. package/dist/types/components/portal/portal.d.ts +9 -42
  129. package/dist/types/components/select/select.template.d.ts +0 -1
  130. package/dist/types/components/snackbar/snackbar.d.ts +9 -7
  131. package/dist/types/components/tooltip/tooltip.d.ts +0 -1
  132. package/dist/types/components.d.ts +26 -92
  133. package/dist/types/index.d.ts +7 -0
  134. package/package.json +16 -13
  135. package/dist/lime-elements/p-480884e6.entry.js +0 -90
  136. package/dist/lime-elements/p-480884e6.entry.js.map +0 -1
  137. package/dist/lime-elements/p-5224d7bb.entry.js +0 -2
  138. package/dist/lime-elements/p-5224d7bb.entry.js.map +0 -1
  139. package/dist/lime-elements/p-53fc6f0e.entry.js +0 -2
  140. package/dist/lime-elements/p-53fc6f0e.entry.js.map +0 -1
  141. package/dist/lime-elements/p-773e3d4f.entry.js.map +0 -1
  142. package/dist/lime-elements/p-9a895330.entry.js +0 -2
  143. package/dist/lime-elements/p-9a895330.entry.js.map +0 -1
  144. package/dist/lime-elements/p-b8bfe44d.entry.js.map +0 -1
  145. package/dist/lime-elements/p-d1838cf6.entry.js.map +0 -1
  146. package/dist/lime-elements/p-d4d2593b.entry.js +0 -2
  147. package/dist/lime-elements/p-d4d2593b.entry.js.map +0 -1
  148. package/dist/lime-elements/p-ed214c35.entry.js.map +0 -1
  149. package/dist/lime-elements/p-ef5539b0.entry.js +0 -68
  150. package/dist/lime-elements/p-ef5539b0.entry.js.map +0 -1
@@ -1979,12 +1979,11 @@ export namespace Components {
1979
1979
  "contentCollection": HTMLCollection;
1980
1980
  }
1981
1981
  /**
1982
- * The portal component provides a way to render children into a DOM node that
1983
- * exist outside the DOM hierarchy of the parent component.
1984
- * When the limel-portal component is used, it creates a new DOM node (a div element)
1985
- * and appends it to a parent element (by default, the body of the document).
1986
- * The child elements of the limel-portal are then moved from
1987
- * their original location in the DOM to this new div element.
1982
+ * The portal component provides a way to render children in the top layer of
1983
+ * the document (https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
1984
+ * When the limel-portal component is used, it renders a container with the
1985
+ * `popover` attribute set to `manual` in order to render all content on top of
1986
+ * everything else.
1988
1987
  * This technique is often used to overcome CSS stacking context issues,
1989
1988
  * or to render UI elements like modals, dropdowns, tooltips, etc.,
1990
1989
  * that need to visually "break out" of their container.
@@ -1994,19 +1993,10 @@ export namespace Components {
1994
1993
  * z-indexes, or other stacking context issues.
1995
1994
  * :::important
1996
1995
  * There are some caveats when using this component
1997
- * 1. Events might not bubble up as expected since the content is moved out to
1998
- * another DOM node.
1999
- * 2. Any styling that is applied to content from the parent will be lost, if the
2000
- * content is just another web-component it will work without any issues.
2001
- * Alternatively, use the `style=""` html attribute.
2002
- * 3. Any component that is placed inside the container must have a style of
1996
+ * 1. Any component that is placed inside the container must have a style of
2003
1997
  * `max-height: inherit`. This ensures that its placement is calculated
2004
1998
  * correctly in relation to the trigger, and that it never covers its own
2005
1999
  * trigger.
2006
- * 4. When the node is moved in the DOM, `disconnectedCallback` and
2007
- * `connectedCallback` will be invoked, so if `disconnectedCallback` is used
2008
- * to do any tear-down, the appropriate setup will have to be done again on
2009
- * `connectedCallback`.
2010
2000
  * :::
2011
2001
  * @private
2012
2002
  * @exampleComponent limel-example-portal-basic
@@ -2016,14 +2006,6 @@ export namespace Components {
2016
2006
  * The element that the content should be positioned relative to. Defaults to the limel-portal element.
2017
2007
  */
2018
2008
  "anchor"?: HTMLElement;
2019
- /**
2020
- * A unique ID.
2021
- */
2022
- "containerId": string;
2023
- /**
2024
- * Dynamic styling that can be applied to the container holding the content.
2025
- */
2026
- "containerStyle": object;
2027
2009
  /**
2028
2010
  * Used to make a dropdown have the same width as the trigger, for example in `limel-picker`.
2029
2011
  */
@@ -2032,10 +2014,6 @@ export namespace Components {
2032
2014
  * Decides which direction the portal content should open.
2033
2015
  */
2034
2016
  "openDirection": OpenDirection;
2035
- /**
2036
- * The `parent` property specifies the parent element where the content of the portal will be moved to. By default, it is set to `document.body`, meaning the content will be appended as a child of the body element in the DOM. If you want the content to be appended to a different element, you can specify that element by setting this property. Please note that the specified parent element should exist in the DOM at the time of rendering the portal.
2037
- */
2038
- "parent": HTMLElement;
2039
2017
  /**
2040
2018
  * Position of the content.
2041
2019
  */
@@ -2264,7 +2242,6 @@ export namespace Components {
2264
2242
  * @exampleComponent limel-example-snackbar-dismissible
2265
2243
  * @exampleComponent limel-example-snackbar-with-action
2266
2244
  * @exampleComponent limel-example-snackbar-with-changing-messages
2267
- * @exampleComponent limel-example-snackbar-positioning
2268
2245
  */
2269
2246
  interface LimelSnackbar {
2270
2247
  /**
@@ -2285,6 +2262,7 @@ export namespace Components {
2285
2262
  "message": string;
2286
2263
  /**
2287
2264
  * Whether to show the snackbar with space for multiple lines of text
2265
+ * @deprecated Setting this property no longer has any effect. The property will be removed in a future major version.
2288
2266
  */
2289
2267
  "multiline": boolean;
2290
2268
  /**
@@ -3858,12 +3836,11 @@ declare global {
3858
3836
  new (): HTMLLimelPopoverSurfaceElement;
3859
3837
  };
3860
3838
  /**
3861
- * The portal component provides a way to render children into a DOM node that
3862
- * exist outside the DOM hierarchy of the parent component.
3863
- * When the limel-portal component is used, it creates a new DOM node (a div element)
3864
- * and appends it to a parent element (by default, the body of the document).
3865
- * The child elements of the limel-portal are then moved from
3866
- * their original location in the DOM to this new div element.
3839
+ * The portal component provides a way to render children in the top layer of
3840
+ * the document (https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
3841
+ * When the limel-portal component is used, it renders a container with the
3842
+ * `popover` attribute set to `manual` in order to render all content on top of
3843
+ * everything else.
3867
3844
  * This technique is often used to overcome CSS stacking context issues,
3868
3845
  * or to render UI elements like modals, dropdowns, tooltips, etc.,
3869
3846
  * that need to visually "break out" of their container.
@@ -3873,19 +3850,10 @@ declare global {
3873
3850
  * z-indexes, or other stacking context issues.
3874
3851
  * :::important
3875
3852
  * There are some caveats when using this component
3876
- * 1. Events might not bubble up as expected since the content is moved out to
3877
- * another DOM node.
3878
- * 2. Any styling that is applied to content from the parent will be lost, if the
3879
- * content is just another web-component it will work without any issues.
3880
- * Alternatively, use the `style=""` html attribute.
3881
- * 3. Any component that is placed inside the container must have a style of
3853
+ * 1. Any component that is placed inside the container must have a style of
3882
3854
  * `max-height: inherit`. This ensures that its placement is calculated
3883
3855
  * correctly in relation to the trigger, and that it never covers its own
3884
3856
  * trigger.
3885
- * 4. When the node is moved in the DOM, `disconnectedCallback` and
3886
- * `connectedCallback` will be invoked, so if `disconnectedCallback` is used
3887
- * to do any tear-down, the appropriate setup will have to be done again on
3888
- * `connectedCallback`.
3889
3857
  * :::
3890
3858
  * @private
3891
3859
  * @exampleComponent limel-example-portal-basic
@@ -4003,7 +3971,6 @@ declare global {
4003
3971
  * @exampleComponent limel-example-snackbar-dismissible
4004
3972
  * @exampleComponent limel-example-snackbar-with-action
4005
3973
  * @exampleComponent limel-example-snackbar-with-changing-messages
4006
- * @exampleComponent limel-example-snackbar-positioning
4007
3974
  */
4008
3975
  interface HTMLLimelSnackbarElement extends Components.LimelSnackbar, HTMLStencilElement {
4009
3976
  }
@@ -6363,12 +6330,11 @@ declare namespace LocalJSX {
6363
6330
  "contentCollection"?: HTMLCollection;
6364
6331
  }
6365
6332
  /**
6366
- * The portal component provides a way to render children into a DOM node that
6367
- * exist outside the DOM hierarchy of the parent component.
6368
- * When the limel-portal component is used, it creates a new DOM node (a div element)
6369
- * and appends it to a parent element (by default, the body of the document).
6370
- * The child elements of the limel-portal are then moved from
6371
- * their original location in the DOM to this new div element.
6333
+ * The portal component provides a way to render children in the top layer of
6334
+ * the document (https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
6335
+ * When the limel-portal component is used, it renders a container with the
6336
+ * `popover` attribute set to `manual` in order to render all content on top of
6337
+ * everything else.
6372
6338
  * This technique is often used to overcome CSS stacking context issues,
6373
6339
  * or to render UI elements like modals, dropdowns, tooltips, etc.,
6374
6340
  * that need to visually "break out" of their container.
@@ -6378,19 +6344,10 @@ declare namespace LocalJSX {
6378
6344
  * z-indexes, or other stacking context issues.
6379
6345
  * :::important
6380
6346
  * There are some caveats when using this component
6381
- * 1. Events might not bubble up as expected since the content is moved out to
6382
- * another DOM node.
6383
- * 2. Any styling that is applied to content from the parent will be lost, if the
6384
- * content is just another web-component it will work without any issues.
6385
- * Alternatively, use the `style=""` html attribute.
6386
- * 3. Any component that is placed inside the container must have a style of
6347
+ * 1. Any component that is placed inside the container must have a style of
6387
6348
  * `max-height: inherit`. This ensures that its placement is calculated
6388
6349
  * correctly in relation to the trigger, and that it never covers its own
6389
6350
  * trigger.
6390
- * 4. When the node is moved in the DOM, `disconnectedCallback` and
6391
- * `connectedCallback` will be invoked, so if `disconnectedCallback` is used
6392
- * to do any tear-down, the appropriate setup will have to be done again on
6393
- * `connectedCallback`.
6394
6351
  * :::
6395
6352
  * @private
6396
6353
  * @exampleComponent limel-example-portal-basic
@@ -6400,14 +6357,6 @@ declare namespace LocalJSX {
6400
6357
  * The element that the content should be positioned relative to. Defaults to the limel-portal element.
6401
6358
  */
6402
6359
  "anchor"?: HTMLElement;
6403
- /**
6404
- * A unique ID.
6405
- */
6406
- "containerId"?: string;
6407
- /**
6408
- * Dynamic styling that can be applied to the container holding the content.
6409
- */
6410
- "containerStyle"?: object;
6411
6360
  /**
6412
6361
  * Used to make a dropdown have the same width as the trigger, for example in `limel-picker`.
6413
6362
  */
@@ -6416,10 +6365,6 @@ declare namespace LocalJSX {
6416
6365
  * Decides which direction the portal content should open.
6417
6366
  */
6418
6367
  "openDirection"?: OpenDirection;
6419
- /**
6420
- * The `parent` property specifies the parent element where the content of the portal will be moved to. By default, it is set to `document.body`, meaning the content will be appended as a child of the body element in the DOM. If you want the content to be appended to a different element, you can specify that element by setting this property. Please note that the specified parent element should exist in the DOM at the time of rendering the portal.
6421
- */
6422
- "parent"?: HTMLElement;
6423
6368
  /**
6424
6369
  * Position of the content.
6425
6370
  */
@@ -6668,7 +6613,6 @@ declare namespace LocalJSX {
6668
6613
  * @exampleComponent limel-example-snackbar-dismissible
6669
6614
  * @exampleComponent limel-example-snackbar-with-action
6670
6615
  * @exampleComponent limel-example-snackbar-with-changing-messages
6671
- * @exampleComponent limel-example-snackbar-positioning
6672
6616
  */
6673
6617
  interface LimelSnackbar {
6674
6618
  /**
@@ -6689,6 +6633,7 @@ declare namespace LocalJSX {
6689
6633
  "message"?: string;
6690
6634
  /**
6691
6635
  * Whether to show the snackbar with space for multiple lines of text
6636
+ * @deprecated Setting this property no longer has any effect. The property will be removed in a future major version.
6692
6637
  */
6693
6638
  "multiline"?: boolean;
6694
6639
  /**
@@ -7989,12 +7934,11 @@ declare module "@stencil/core" {
7989
7934
  */
7990
7935
  "limel-popover-surface": LocalJSX.LimelPopoverSurface & JSXBase.HTMLAttributes<HTMLLimelPopoverSurfaceElement>;
7991
7936
  /**
7992
- * The portal component provides a way to render children into a DOM node that
7993
- * exist outside the DOM hierarchy of the parent component.
7994
- * When the limel-portal component is used, it creates a new DOM node (a div element)
7995
- * and appends it to a parent element (by default, the body of the document).
7996
- * The child elements of the limel-portal are then moved from
7997
- * their original location in the DOM to this new div element.
7937
+ * The portal component provides a way to render children in the top layer of
7938
+ * the document (https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
7939
+ * When the limel-portal component is used, it renders a container with the
7940
+ * `popover` attribute set to `manual` in order to render all content on top of
7941
+ * everything else.
7998
7942
  * This technique is often used to overcome CSS stacking context issues,
7999
7943
  * or to render UI elements like modals, dropdowns, tooltips, etc.,
8000
7944
  * that need to visually "break out" of their container.
@@ -8004,19 +7948,10 @@ declare module "@stencil/core" {
8004
7948
  * z-indexes, or other stacking context issues.
8005
7949
  * :::important
8006
7950
  * There are some caveats when using this component
8007
- * 1. Events might not bubble up as expected since the content is moved out to
8008
- * another DOM node.
8009
- * 2. Any styling that is applied to content from the parent will be lost, if the
8010
- * content is just another web-component it will work without any issues.
8011
- * Alternatively, use the `style=""` html attribute.
8012
- * 3. Any component that is placed inside the container must have a style of
7951
+ * 1. Any component that is placed inside the container must have a style of
8013
7952
  * `max-height: inherit`. This ensures that its placement is calculated
8014
7953
  * correctly in relation to the trigger, and that it never covers its own
8015
7954
  * trigger.
8016
- * 4. When the node is moved in the DOM, `disconnectedCallback` and
8017
- * `connectedCallback` will be invoked, so if `disconnectedCallback` is used
8018
- * to do any tear-down, the appropriate setup will have to be done again on
8019
- * `connectedCallback`.
8020
7955
  * :::
8021
7956
  * @private
8022
7957
  * @exampleComponent limel-example-portal-basic
@@ -8099,7 +8034,6 @@ declare module "@stencil/core" {
8099
8034
  * @exampleComponent limel-example-snackbar-dismissible
8100
8035
  * @exampleComponent limel-example-snackbar-with-action
8101
8036
  * @exampleComponent limel-example-snackbar-with-changing-messages
8102
- * @exampleComponent limel-example-snackbar-positioning
8103
8037
  */
8104
8038
  "limel-snackbar": LocalJSX.LimelSnackbar & JSXBase.HTMLAttributes<HTMLLimelSnackbarElement>;
8105
8039
  /**
@@ -1,3 +1,10 @@
1
1
  export * from './components';
2
2
  export * from './interface';
3
+ declare module '@stencil/core/internal' {
4
+ namespace JSXBase {
5
+ interface HTMLAttributes {
6
+ popover?: 'auto' | 'manual';
7
+ }
8
+ }
9
+ }
3
10
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.55.4",
3
+ "version": "37.55.6",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,9 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@commitlint/config-conventional": "^19.2.2",
47
- "@microsoft/api-extractor": "^7.46.2",
47
+ "@eslint/eslintrc": "^3.1.0",
48
+ "@eslint/js": "^9.8.0",
49
+ "@microsoft/api-extractor": "^7.47.5",
48
50
  "@popperjs/core": "^2.11.8",
49
51
  "@rjsf/core": "^2.4.2",
50
52
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -57,35 +59,36 @@
57
59
  "@types/react": "^18.2.79",
58
60
  "@types/react-dom": "^18.2.25",
59
61
  "@types/tabulator-tables": "^4.9.4",
60
- "@typescript-eslint/eslint-plugin": "^7.7.1",
61
- "@typescript-eslint/parser": "^7.7.1",
62
+ "@typescript-eslint/eslint-plugin": "^8.1.0",
63
+ "@typescript-eslint/parser": "^8.1.0",
62
64
  "codemirror": "^5.65.9",
63
65
  "cross-env": "^7.0.3",
64
- "dayjs": "^1.11.11",
65
- "eslint": "^8.57.0",
66
+ "dayjs": "^1.11.12",
67
+ "eslint": "^9.9.0",
66
68
  "eslint-config-prettier": "^9.1.0",
67
69
  "eslint-plugin-ban": "^1.6.0",
68
70
  "eslint-plugin-prefer-arrow": "^1.2.3",
69
- "eslint-plugin-prettier": "^5.1.3",
70
- "eslint-plugin-react": "^7.34.1",
71
- "eslint-plugin-sonarjs": "^0.25.1",
72
- "eslint-plugin-tsdoc": "^0.2.17",
71
+ "eslint-plugin-prettier": "^5.2.1",
72
+ "eslint-plugin-react": "^7.35.0",
73
+ "eslint-plugin-sonarjs": "^1.0.4",
74
+ "eslint-plugin-tsdoc": "^0.3.0",
73
75
  "flatpickr": "^4.6.13",
76
+ "globals": "^15.9.0",
74
77
  "html-escaper": "^3.0.3",
75
78
  "jest": "^27.5.1",
76
79
  "jest-cli": "^27.5.1",
77
80
  "jsonlint-mod": "^1.7.6",
78
81
  "jsx-dom": "^8.1.4",
79
- "kompendium": "^0.14.2",
82
+ "kompendium": "^0.14.3",
80
83
  "lodash-es": "^4.17.21",
81
84
  "material-components-web": "^13.0.0",
82
85
  "moment": "^2.30.1",
83
86
  "number-abbreviate": "^2.0.0",
84
87
  "parse-css-color": "^0.2.1",
85
- "prettier": "^3.2.5",
88
+ "prettier": "^3.3.3",
86
89
  "prosemirror-example-setup": "^1.2.2",
87
90
  "prosemirror-markdown": "^1.12.0",
88
- "prosemirror-schema-basic": "^1.2.2",
91
+ "prosemirror-schema-basic": "^1.2.3",
89
92
  "puppeteer": "^19.11.1",
90
93
  "react": "^18.2.0",
91
94
  "react-dom": "^18.2.0",
@@ -1,90 +0,0 @@
1
- import{r as t,c as i,h as n,g as s}from"./p-443111b3.js";import{t as e}from"./p-1b6c1122.js";import{_ as r,a,M as c,b as o}from"./p-2ff3f85e.js";import{c as u}from"./p-dcc97cc2.js";
2
- /**
3
- * @license
4
- * Copyright 2018 Google Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in
14
- * all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- * THE SOFTWARE.
23
- */var f={CLOSING:"mdc-snackbar--closing",OPEN:"mdc-snackbar--open",OPENING:"mdc-snackbar--opening"};var l={ACTION_SELECTOR:".mdc-snackbar__action",ARIA_LIVE_LABEL_TEXT_ATTR:"data-mdc-snackbar-label-text",CLOSED_EVENT:"MDCSnackbar:closed",CLOSING_EVENT:"MDCSnackbar:closing",DISMISS_SELECTOR:".mdc-snackbar__dismiss",LABEL_SELECTOR:".mdc-snackbar__label",OPENED_EVENT:"MDCSnackbar:opened",OPENING_EVENT:"MDCSnackbar:opening",REASON_ACTION:"action",REASON_DISMISS:"dismiss",SURFACE_SELECTOR:".mdc-snackbar__surface"};var h={DEFAULT_AUTO_DISMISS_TIMEOUT_MS:5e3,INDETERMINATE:-1,MAX_AUTO_DISMISS_TIMEOUT_MS:1e4,MIN_AUTO_DISMISS_TIMEOUT_MS:4e3,SNACKBAR_ANIMATION_CLOSE_TIME_MS:75,SNACKBAR_ANIMATION_OPEN_TIME_MS:150,ARIA_LIVE_DELAY_MS:1e3};
24
- /**
25
- * @license
26
- * Copyright 2018 Google Inc.
27
- *
28
- * Permission is hereby granted, free of charge, to any person obtaining a copy
29
- * of this software and associated documentation files (the "Software"), to deal
30
- * in the Software without restriction, including without limitation the rights
31
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
- * copies of the Software, and to permit persons to whom the Software is
33
- * furnished to do so, subject to the following conditions:
34
- *
35
- * The above copyright notice and this permission notice shall be included in
36
- * all copies or substantial portions of the Software.
37
- *
38
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
- * THE SOFTWARE.
45
- */var d=h.ARIA_LIVE_DELAY_MS;var m=l.ARIA_LIVE_LABEL_TEXT_ATTR;function b(t,i){if(i===void 0){i=t}var n=t.getAttribute("aria-live");var s=i.textContent.trim();if(!s||!n){return}t.setAttribute("aria-live","off");i.textContent="";i.innerHTML='<span style="display: inline-block; width: 0; height: 1px;">&nbsp;</span>';i.setAttribute(m,s);setTimeout((function(){t.setAttribute("aria-live",n);i.removeAttribute(m);i.textContent=s}),d)}
46
- /**
47
- * @license
48
- * Copyright 2018 Google Inc.
49
- *
50
- * Permission is hereby granted, free of charge, to any person obtaining a copy
51
- * of this software and associated documentation files (the "Software"), to deal
52
- * in the Software without restriction, including without limitation the rights
53
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
- * copies of the Software, and to permit persons to whom the Software is
55
- * furnished to do so, subject to the following conditions:
56
- *
57
- * The above copyright notice and this permission notice shall be included in
58
- * all copies or substantial portions of the Software.
59
- *
60
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
- * THE SOFTWARE.
67
- */var _=f.OPENING,g=f.OPEN,k=f.CLOSING;var v=l.REASON_ACTION,p=l.REASON_DISMISS;var E=function(t){r(i,t);function i(n){var s=t.call(this,a(a({},i.defaultAdapter),n))||this;s.opened=false;s.animationFrame=0;s.animationTimer=0;s.autoDismissTimer=0;s.autoDismissTimeoutMs=h.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;s.closeOnEscape=true;return s}Object.defineProperty(i,"cssClasses",{get:function(){return f},enumerable:false,configurable:true});Object.defineProperty(i,"strings",{get:function(){return l},enumerable:false,configurable:true});Object.defineProperty(i,"numbers",{get:function(){return h},enumerable:false,configurable:true});Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},announce:function(){return undefined},notifyClosed:function(){return undefined},notifyClosing:function(){return undefined},notifyOpened:function(){return undefined},notifyOpening:function(){return undefined},removeClass:function(){return undefined}}},enumerable:false,configurable:true});i.prototype.destroy=function(){this.clearAutoDismissTimer();cancelAnimationFrame(this.animationFrame);this.animationFrame=0;clearTimeout(this.animationTimer);this.animationTimer=0;this.adapter.removeClass(_);this.adapter.removeClass(g);this.adapter.removeClass(k)};i.prototype.open=function(){var t=this;this.clearAutoDismissTimer();this.opened=true;this.adapter.notifyOpening();this.adapter.removeClass(k);this.adapter.addClass(_);this.adapter.announce();this.runNextAnimationFrame((function(){t.adapter.addClass(g);t.animationTimer=setTimeout((function(){var i=t.getTimeoutMs();t.handleAnimationTimerEnd();t.adapter.notifyOpened();if(i!==h.INDETERMINATE){t.autoDismissTimer=setTimeout((function(){t.close(p)}),i)}}),h.SNACKBAR_ANIMATION_OPEN_TIME_MS)}))};i.prototype.close=function(t){var i=this;if(t===void 0){t=""}if(!this.opened){return}cancelAnimationFrame(this.animationFrame);this.animationFrame=0;this.clearAutoDismissTimer();this.opened=false;this.adapter.notifyClosing(t);this.adapter.addClass(f.CLOSING);this.adapter.removeClass(f.OPEN);this.adapter.removeClass(f.OPENING);clearTimeout(this.animationTimer);this.animationTimer=setTimeout((function(){i.handleAnimationTimerEnd();i.adapter.notifyClosed(t)}),h.SNACKBAR_ANIMATION_CLOSE_TIME_MS)};i.prototype.isOpen=function(){return this.opened};i.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs};i.prototype.setTimeoutMs=function(t){var i=h.MIN_AUTO_DISMISS_TIMEOUT_MS;var n=h.MAX_AUTO_DISMISS_TIMEOUT_MS;var s=h.INDETERMINATE;if(t===h.INDETERMINATE||t<=n&&t>=i){this.autoDismissTimeoutMs=t}else{throw new Error("\n timeoutMs must be an integer in the range "+i+"–"+n+"\n (or "+s+" to disable), but got '"+t+"'")}};i.prototype.getCloseOnEscape=function(){return this.closeOnEscape};i.prototype.setCloseOnEscape=function(t){this.closeOnEscape=t};i.prototype.handleKeyDown=function(t){var i=t.key==="Escape"||t.keyCode===27;if(i&&this.getCloseOnEscape()){this.close(p)}};i.prototype.handleActionButtonClick=function(t){this.close(v)};i.prototype.handleActionIconClick=function(t){this.close(p)};i.prototype.clearAutoDismissTimer=function(){clearTimeout(this.autoDismissTimer);this.autoDismissTimer=0};i.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0;this.adapter.removeClass(f.OPENING);this.adapter.removeClass(f.CLOSING)};i.prototype.runNextAnimationFrame=function(t){var i=this;cancelAnimationFrame(this.animationFrame);this.animationFrame=requestAnimationFrame((function(){i.animationFrame=0;clearTimeout(i.animationTimer);i.animationTimer=setTimeout(t,0)}))};return i}(c);
68
- /**
69
- * @license
70
- * Copyright 2018 Google Inc.
71
- *
72
- * Permission is hereby granted, free of charge, to any person obtaining a copy
73
- * of this software and associated documentation files (the "Software"), to deal
74
- * in the Software without restriction, including without limitation the rights
75
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
76
- * copies of the Software, and to permit persons to whom the Software is
77
- * furnished to do so, subject to the following conditions:
78
- *
79
- * The above copyright notice and this permission notice shall be included in
80
- * all copies or substantial portions of the Software.
81
- *
82
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
83
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
84
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
85
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
86
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
87
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
88
- * THE SOFTWARE.
89
- */var T=l.SURFACE_SELECTOR,O=l.LABEL_SELECTOR,S=l.ACTION_SELECTOR,y=l.DISMISS_SELECTOR,A=l.OPENING_EVENT,I=l.OPENED_EVENT,M=l.CLOSING_EVENT,C=l.CLOSED_EVENT;var N=function(t){r(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.attachTo=function(t){return new i(t)};i.prototype.initialize=function(t){if(t===void 0){t=function(){return b}}this.announce=t()};i.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl=this.root.querySelector(T);this.labelEl=this.root.querySelector(O);this.actionEl=this.root.querySelector(S);this.handleKeyDown=function(i){t.foundation.handleKeyDown(i)};this.handleSurfaceClick=function(i){var n=i.target;if(t.isActionButton(n)){t.foundation.handleActionButtonClick(i)}else if(t.isActionIcon(n)){t.foundation.handleActionIconClick(i)}};this.registerKeyDownHandler(this.handleKeyDown);this.registerSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.deregisterKeyDownHandler(this.handleKeyDown);this.deregisterSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.open=function(){this.foundation.open()};i.prototype.close=function(t){if(t===void 0){t=""}this.foundation.close(t)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClass:function(i){t.root.classList.add(i)},announce:function(){t.announce(t.labelEl)},notifyClosed:function(i){return t.emit(C,i?{reason:i}:{})},notifyClosing:function(i){return t.emit(M,i?{reason:i}:{})},notifyOpened:function(){return t.emit(I,{})},notifyOpening:function(){return t.emit(A,{})},removeClass:function(i){return t.root.classList.remove(i)}};return new E(i)};Object.defineProperty(i.prototype,"timeoutMs",{get:function(){return this.foundation.getTimeoutMs()},set:function(t){this.foundation.setTimeoutMs(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"closeOnEscape",{get:function(){return this.foundation.getCloseOnEscape()},set:function(t){this.foundation.setCloseOnEscape(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"labelText",{get:function(){return this.labelEl.textContent},set:function(t){this.labelEl.textContent=t},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"actionButtonText",{get:function(){return this.actionEl.textContent},set:function(t){this.actionEl.textContent=t},enumerable:false,configurable:true});i.prototype.registerKeyDownHandler=function(t){this.listen("keydown",t)};i.prototype.deregisterKeyDownHandler=function(t){this.unlisten("keydown",t)};i.prototype.registerSurfaceClickHandler=function(t){this.surfaceEl.addEventListener("click",t)};i.prototype.deregisterSurfaceClickHandler=function(t){this.surfaceEl.removeEventListener("click",t)};i.prototype.isActionButton=function(t){return Boolean(u(t,S))};i.prototype.isActionIcon=function(t){return Boolean(u(t,y))};return i}(o);const w="*{box-sizing:border-box}.mdc-snackbar{top:var(--snackbar-top, auto);right:var(--snackbar-right, 0);bottom:var(--snackbar-bottom, 0);left:var(--snackbar-left, 0);display:none;position:fixed;z-index:8;padding:0.75rem;align-items:center;justify-content:center}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1}.mdc-snackbar__surface{transition:opacity 0.2s cubic-bezier(0, 0, 0.2, 1), transform 0.2s cubic-bezier(0, 0, 0.2, 1);padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;min-width:unset;max-width:42rem;transform:scale(0.8);opacity:0;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.mdc-snackbar__label{visibility:hidden;color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:0.8125rem;font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.mdc-snackbar__actions{visibility:hidden;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.mdc-snackbar__actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--mdc-theme-on-surface:rgb(var(--contrast-100));--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--mdc-theme-primary);--track-color:rgb(var(--contrast-800), 0.2);position:absolute;top:-0.9rem;left:-0.9rem;transform:scale(0.8);display:flex;align-items:center;justify-content:center}.dismiss limel-icon-button.mdc-snackbar__dismiss{transform:scale(0.8);margin:0;padding:0}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}.mdc-snackbar--open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}";const x=class{constructor(n){t(this,n);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-snackbar");if(!t){return}this.mdcSnackbar=new N(t);this.mdcSnackbar.listen("MDCSnackbar:closing",this.handleMdcClosing)}disconnectedCallback(){this.mdcSnackbar.unlisten("MDCSnackbar:closing",this.handleMdcClosing);this.mdcSnackbar.destroy()}async show(){if(this.timeout){this.mdcSnackbar.timeoutMs=this.timeout}this.mdcSnackbar.labelText=this.message;this.mdcSnackbar.open()}render(){return n("aside",{class:`\n mdc-snackbar\n ${this.multiline?"mdc-snackbar--stacked":""}\n `,style:{"--snackbar-timeout":`${this.timeout}ms`}},n("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},n("div",{class:"mdc-snackbar__label","aria-atomic":"false"}),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}handleMdcClosing(t){if(t.detail.reason==="action"){this.action.emit()}else{this.hide.emit()}}renderActions(t){if(!t){return}return n("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return n("limel-button",{class:"mdc-button mdc-snackbar__action",label:t})}renderDismissButton(t){if(!t){return}const i=e.get("snackbar.dismiss",this.language);return n("div",{class:"dismiss"},this.renderTimeoutVisualization(),n("limel-icon-button",{class:"mdc-icon-button mdc-snackbar__dismiss",icon:"multiply",label:i}))}renderTimeoutVisualization(){return n("svg",{width:"36",height:"36",viewBox:"0 0 36 36"},n("circle",{r:"18",cx:"18",cy:"18",fill:"var(--track-color)"}),n("path",{class:"track",d:"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0",stroke:"var(--fill-color)"}))}get host(){return s(this)}};x.style=w;export{x as limel_snackbar};
90
- //# sourceMappingURL=p-480884e6.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["cssClasses","CLOSING","OPEN","OPENING","strings","ACTION_SELECTOR","ARIA_LIVE_LABEL_TEXT_ATTR","CLOSED_EVENT","CLOSING_EVENT","DISMISS_SELECTOR","LABEL_SELECTOR","OPENED_EVENT","OPENING_EVENT","REASON_ACTION","REASON_DISMISS","SURFACE_SELECTOR","numbers","DEFAULT_AUTO_DISMISS_TIMEOUT_MS","INDETERMINATE","MAX_AUTO_DISMISS_TIMEOUT_MS","MIN_AUTO_DISMISS_TIMEOUT_MS","SNACKBAR_ANIMATION_CLOSE_TIME_MS","SNACKBAR_ANIMATION_OPEN_TIME_MS","ARIA_LIVE_DELAY_MS","announce","ariaEl","labelEl","priority","getAttribute","labelText","textContent","trim","setAttribute","innerHTML","setTimeout","removeAttribute","MDCSnackbarFoundation","_super","__extends","adapter","_this","call","this","__assign","defaultAdapter","opened","animationFrame","animationTimer","autoDismissTimer","autoDismissTimeoutMs","closeOnEscape","Object","defineProperty","get","enumerable","configurable","addClass","undefined","notifyClosed","notifyClosing","notifyOpened","notifyOpening","removeClass","prototype","destroy","clearAutoDismissTimer","cancelAnimationFrame","clearTimeout","open","runNextAnimationFrame","timeoutMs","getTimeoutMs","handleAnimationTimerEnd","close","reason","isOpen","setTimeoutMs","minValue","maxValue","indeterminateValue","Error","getCloseOnEscape","setCloseOnEscape","handleKeyDown","evt","isEscapeKey","key","keyCode","handleActionButtonClick","_evt","handleActionIconClick","callback","requestAnimationFrame","MDCFoundation","MDCSnackbar","apply","arguments","attachTo","root","initialize","announcerFactory","util.announce","initialSyncWithDOM","surfaceEl","querySelector","actionEl","foundation","handleSurfaceClick","target","isActionButton","isActionIcon","registerKeyDownHandler","registerSurfaceClickHandler","deregisterKeyDownHandler","deregisterSurfaceClickHandler","getDefaultFoundation","className","classList","add","emit","remove","set","actionButtonText","handler","listen","unlisten","addEventListener","removeEventListener","Boolean","closest","MDCComponent","snackbarCss","Snackbar","constructor","hostRef","handleMdcClosing","bind","connectedCallback","componentDidLoad","element","host","shadowRoot","mdcSnackbar","disconnectedCallback","async","timeout","message","render","h","class","multiline","style","role","renderActions","actionText","renderDismissButton","dismissible","event","detail","action","hide","renderActionButton","label","translate","language","renderTimeoutVisualization","icon","width","height","viewBox","r","cx","cy","fill","d","stroke"],"sources":["./node_modules/@material/snackbar/constants.js","./node_modules/@material/snackbar/util.js","./node_modules/@material/snackbar/foundation.js","./node_modules/@material/snackbar/component.js","./src/components/snackbar/snackbar.scss?tag=limel-snackbar&encapsulation=shadow","./src/components/snackbar/snackbar.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar cssClasses = {\n CLOSING: 'mdc-snackbar--closing',\n OPEN: 'mdc-snackbar--open',\n OPENING: 'mdc-snackbar--opening',\n};\nvar strings = {\n ACTION_SELECTOR: '.mdc-snackbar__action',\n ARIA_LIVE_LABEL_TEXT_ATTR: 'data-mdc-snackbar-label-text',\n CLOSED_EVENT: 'MDCSnackbar:closed',\n CLOSING_EVENT: 'MDCSnackbar:closing',\n DISMISS_SELECTOR: '.mdc-snackbar__dismiss',\n LABEL_SELECTOR: '.mdc-snackbar__label',\n OPENED_EVENT: 'MDCSnackbar:opened',\n OPENING_EVENT: 'MDCSnackbar:opening',\n REASON_ACTION: 'action',\n REASON_DISMISS: 'dismiss',\n SURFACE_SELECTOR: '.mdc-snackbar__surface',\n};\nvar numbers = {\n DEFAULT_AUTO_DISMISS_TIMEOUT_MS: 5000,\n INDETERMINATE: -1,\n MAX_AUTO_DISMISS_TIMEOUT_MS: 10000,\n MIN_AUTO_DISMISS_TIMEOUT_MS: 4000,\n // These variables need to be kept in sync with the values in _variables.scss.\n SNACKBAR_ANIMATION_CLOSE_TIME_MS: 75,\n SNACKBAR_ANIMATION_OPEN_TIME_MS: 150,\n /**\n * Number of milliseconds to wait between temporarily clearing the label text\n * in the DOM and subsequently restoring it. This is necessary to force IE 11\n * to pick up the `aria-live` content change and announce it to the user.\n */\n ARIA_LIVE_DELAY_MS: 1000,\n};\nexport { cssClasses, strings, numbers };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { numbers, strings } from './constants';\nvar ARIA_LIVE_DELAY_MS = numbers.ARIA_LIVE_DELAY_MS;\nvar ARIA_LIVE_LABEL_TEXT_ATTR = strings.ARIA_LIVE_LABEL_TEXT_ATTR;\nfunction announce(ariaEl, labelEl) {\n if (labelEl === void 0) { labelEl = ariaEl; }\n var priority = ariaEl.getAttribute('aria-live');\n // Trim text to ignore `&nbsp;` (see below).\n // textContent is only null if the node is a document, DOCTYPE, or notation.\n var labelText = labelEl.textContent.trim();\n if (!labelText || !priority) {\n return;\n }\n // Temporarily disable `aria-live` to prevent JAWS+Firefox from announcing the message twice.\n ariaEl.setAttribute('aria-live', 'off');\n // Temporarily clear `textContent` to force a DOM mutation event that will be detected by screen readers.\n // `aria-live` elements are only announced when the element's `textContent` *changes*, so snackbars\n // sent to the browser in the initial HTML response won't be read unless we clear the element's `textContent` first.\n // Similarly, displaying the same snackbar message twice in a row doesn't trigger a DOM mutation event,\n // so screen readers won't announce the second message unless we first clear `textContent`.\n //\n // We have to clear the label text two different ways to make it work in all browsers and screen readers:\n //\n // 1. `textContent = ''` is required for IE11 + JAWS\n // 2. `innerHTML = '&nbsp;'` is required for Chrome + JAWS and NVDA\n //\n // All other browser/screen reader combinations support both methods.\n //\n // The wrapper `<span>` visually hides the space character so that it doesn't cause jank when added/removed.\n // N.B.: Setting `position: absolute`, `opacity: 0`, or `height: 0` prevents Chrome from detecting the DOM change.\n //\n // This technique has been tested in:\n //\n // * JAWS 2019:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * NVDA 2018:\n // - Chrome 70\n // - Firefox 60 (ESR)\n // - IE 11\n // * ChromeVox 53\n labelEl.textContent = '';\n labelEl.innerHTML = '<span style=\"display: inline-block; width: 0; height: 1px;\">&nbsp;</span>';\n // Prevent visual jank by temporarily displaying the label text in the ::before pseudo-element.\n // CSS generated content is normally announced by screen readers\n // (except in IE 11; see https://tink.uk/accessibility-support-for-css-generated-content/);\n // however, `aria-live` is turned off, so this DOM update will be ignored by screen readers.\n labelEl.setAttribute(ARIA_LIVE_LABEL_TEXT_ATTR, labelText);\n setTimeout(function () {\n // Allow screen readers to announce changes to the DOM again.\n ariaEl.setAttribute('aria-live', priority);\n // Remove the message from the ::before pseudo-element.\n labelEl.removeAttribute(ARIA_LIVE_LABEL_TEXT_ATTR);\n // Restore the original label text, which will be announced by screen readers.\n labelEl.textContent = labelText;\n }, ARIA_LIVE_DELAY_MS);\n}\nexport { announce };\n//# sourceMappingURL=util.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, numbers, strings } from './constants';\nvar OPENING = cssClasses.OPENING, OPEN = cssClasses.OPEN, CLOSING = cssClasses.CLOSING;\nvar REASON_ACTION = strings.REASON_ACTION, REASON_DISMISS = strings.REASON_DISMISS;\nvar MDCSnackbarFoundation = /** @class */ (function (_super) {\n __extends(MDCSnackbarFoundation, _super);\n function MDCSnackbarFoundation(adapter) {\n var _this = _super.call(this, __assign(__assign({}, MDCSnackbarFoundation.defaultAdapter), adapter)) || this;\n _this.opened = false;\n _this.animationFrame = 0;\n _this.animationTimer = 0;\n _this.autoDismissTimer = 0;\n _this.autoDismissTimeoutMs = numbers.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;\n _this.closeOnEscape = true;\n return _this;\n }\n Object.defineProperty(MDCSnackbarFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbarFoundation, \"defaultAdapter\", {\n get: function () {\n return {\n addClass: function () { return undefined; },\n announce: function () { return undefined; },\n notifyClosed: function () { return undefined; },\n notifyClosing: function () { return undefined; },\n notifyOpened: function () { return undefined; },\n notifyOpening: function () { return undefined; },\n removeClass: function () { return undefined; },\n };\n },\n enumerable: false,\n configurable: true\n });\n MDCSnackbarFoundation.prototype.destroy = function () {\n this.clearAutoDismissTimer();\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n clearTimeout(this.animationTimer);\n this.animationTimer = 0;\n this.adapter.removeClass(OPENING);\n this.adapter.removeClass(OPEN);\n this.adapter.removeClass(CLOSING);\n };\n MDCSnackbarFoundation.prototype.open = function () {\n var _this = this;\n this.clearAutoDismissTimer();\n this.opened = true;\n this.adapter.notifyOpening();\n this.adapter.removeClass(CLOSING);\n this.adapter.addClass(OPENING);\n this.adapter.announce();\n // Wait a frame once display is no longer \"none\", to establish basis for animation\n this.runNextAnimationFrame(function () {\n _this.adapter.addClass(OPEN);\n _this.animationTimer = setTimeout(function () {\n var timeoutMs = _this.getTimeoutMs();\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyOpened();\n if (timeoutMs !== numbers.INDETERMINATE) {\n _this.autoDismissTimer = setTimeout(function () {\n _this.close(REASON_DISMISS);\n }, timeoutMs);\n }\n }, numbers.SNACKBAR_ANIMATION_OPEN_TIME_MS);\n });\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbarFoundation.prototype.close = function (reason) {\n var _this = this;\n if (reason === void 0) { reason = ''; }\n if (!this.opened) {\n // Avoid redundant close calls (and events), e.g. repeated interactions as the snackbar is animating closed\n return;\n }\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = 0;\n this.clearAutoDismissTimer();\n this.opened = false;\n this.adapter.notifyClosing(reason);\n this.adapter.addClass(cssClasses.CLOSING);\n this.adapter.removeClass(cssClasses.OPEN);\n this.adapter.removeClass(cssClasses.OPENING);\n clearTimeout(this.animationTimer);\n this.animationTimer = setTimeout(function () {\n _this.handleAnimationTimerEnd();\n _this.adapter.notifyClosed(reason);\n }, numbers.SNACKBAR_ANIMATION_CLOSE_TIME_MS);\n };\n MDCSnackbarFoundation.prototype.isOpen = function () {\n return this.opened;\n };\n MDCSnackbarFoundation.prototype.getTimeoutMs = function () {\n return this.autoDismissTimeoutMs;\n };\n MDCSnackbarFoundation.prototype.setTimeoutMs = function (timeoutMs) {\n // Use shorter variable names to make the code more readable\n var minValue = numbers.MIN_AUTO_DISMISS_TIMEOUT_MS;\n var maxValue = numbers.MAX_AUTO_DISMISS_TIMEOUT_MS;\n var indeterminateValue = numbers.INDETERMINATE;\n if (timeoutMs === numbers.INDETERMINATE || (timeoutMs <= maxValue && timeoutMs >= minValue)) {\n this.autoDismissTimeoutMs = timeoutMs;\n }\n else {\n throw new Error(\"\\n timeoutMs must be an integer in the range \" + minValue + \"\\u2013\" + maxValue + \"\\n (or \" + indeterminateValue + \" to disable), but got '\" + timeoutMs + \"'\");\n }\n };\n MDCSnackbarFoundation.prototype.getCloseOnEscape = function () {\n return this.closeOnEscape;\n };\n MDCSnackbarFoundation.prototype.setCloseOnEscape = function (closeOnEscape) {\n this.closeOnEscape = closeOnEscape;\n };\n MDCSnackbarFoundation.prototype.handleKeyDown = function (evt) {\n var isEscapeKey = evt.key === 'Escape' || evt.keyCode === 27;\n if (isEscapeKey && this.getCloseOnEscape()) {\n this.close(REASON_DISMISS);\n }\n };\n MDCSnackbarFoundation.prototype.handleActionButtonClick = function (_evt) {\n this.close(REASON_ACTION);\n };\n MDCSnackbarFoundation.prototype.handleActionIconClick = function (_evt) {\n this.close(REASON_DISMISS);\n };\n MDCSnackbarFoundation.prototype.clearAutoDismissTimer = function () {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = 0;\n };\n MDCSnackbarFoundation.prototype.handleAnimationTimerEnd = function () {\n this.animationTimer = 0;\n this.adapter.removeClass(cssClasses.OPENING);\n this.adapter.removeClass(cssClasses.CLOSING);\n };\n /**\n * Runs the given logic on the next animation frame, using setTimeout to factor in Firefox reflow behavior.\n */\n MDCSnackbarFoundation.prototype.runNextAnimationFrame = function (callback) {\n var _this = this;\n cancelAnimationFrame(this.animationFrame);\n this.animationFrame = requestAnimationFrame(function () {\n _this.animationFrame = 0;\n clearTimeout(_this.animationTimer);\n _this.animationTimer = setTimeout(callback, 0);\n });\n };\n return MDCSnackbarFoundation;\n}(MDCFoundation));\nexport { MDCSnackbarFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCSnackbarFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { closest } from '@material/dom/ponyfill';\nimport { strings } from './constants';\nimport { MDCSnackbarFoundation } from './foundation';\nimport * as util from './util';\nvar SURFACE_SELECTOR = strings.SURFACE_SELECTOR, LABEL_SELECTOR = strings.LABEL_SELECTOR, ACTION_SELECTOR = strings.ACTION_SELECTOR, DISMISS_SELECTOR = strings.DISMISS_SELECTOR, OPENING_EVENT = strings.OPENING_EVENT, OPENED_EVENT = strings.OPENED_EVENT, CLOSING_EVENT = strings.CLOSING_EVENT, CLOSED_EVENT = strings.CLOSED_EVENT;\nvar MDCSnackbar = /** @class */ (function (_super) {\n __extends(MDCSnackbar, _super);\n function MDCSnackbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCSnackbar.attachTo = function (root) {\n return new MDCSnackbar(root);\n };\n MDCSnackbar.prototype.initialize = function (announcerFactory) {\n if (announcerFactory === void 0) { announcerFactory = function () { return util.announce; }; }\n this.announce = announcerFactory();\n };\n MDCSnackbar.prototype.initialSyncWithDOM = function () {\n var _this = this;\n this.surfaceEl = this.root.querySelector(SURFACE_SELECTOR);\n this.labelEl = this.root.querySelector(LABEL_SELECTOR);\n this.actionEl = this.root.querySelector(ACTION_SELECTOR);\n this.handleKeyDown = function (evt) {\n _this.foundation.handleKeyDown(evt);\n };\n this.handleSurfaceClick = function (evt) {\n var target = evt.target;\n if (_this.isActionButton(target)) {\n _this.foundation.handleActionButtonClick(evt);\n }\n else if (_this.isActionIcon(target)) {\n _this.foundation.handleActionIconClick(evt);\n }\n };\n this.registerKeyDownHandler(this.handleKeyDown);\n this.registerSurfaceClickHandler(this.handleSurfaceClick);\n };\n MDCSnackbar.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.deregisterKeyDownHandler(this.handleKeyDown);\n this.deregisterSurfaceClickHandler(this.handleSurfaceClick);\n };\n MDCSnackbar.prototype.open = function () {\n this.foundation.open();\n };\n /**\n * @param reason Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the\n * `event.detail.reason` property. Standard values are REASON_ACTION and REASON_DISMISS, but custom\n * client-specific values may also be used if desired.\n */\n MDCSnackbar.prototype.close = function (reason) {\n if (reason === void 0) { reason = ''; }\n this.foundation.close(reason);\n };\n MDCSnackbar.prototype.getDefaultFoundation = function () {\n var _this = this;\n // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.\n // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.\n var adapter = {\n addClass: function (className) {\n _this.root.classList.add(className);\n },\n announce: function () {\n _this.announce(_this.labelEl);\n },\n notifyClosed: function (reason) { return _this.emit(CLOSED_EVENT, reason ? { reason: reason } : {}); },\n notifyClosing: function (reason) { return _this.emit(CLOSING_EVENT, reason ? { reason: reason } : {}); },\n notifyOpened: function () { return _this.emit(OPENED_EVENT, {}); },\n notifyOpening: function () { return _this.emit(OPENING_EVENT, {}); },\n removeClass: function (className) { return _this.root.classList.remove(className); },\n };\n return new MDCSnackbarFoundation(adapter);\n };\n Object.defineProperty(MDCSnackbar.prototype, \"timeoutMs\", {\n get: function () {\n return this.foundation.getTimeoutMs();\n },\n set: function (timeoutMs) {\n this.foundation.setTimeoutMs(timeoutMs);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"closeOnEscape\", {\n get: function () {\n return this.foundation.getCloseOnEscape();\n },\n set: function (closeOnEscape) {\n this.foundation.setCloseOnEscape(closeOnEscape);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"isOpen\", {\n get: function () {\n return this.foundation.isOpen();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"labelText\", {\n get: function () {\n // This property only returns null if the node is a document, DOCTYPE,\n // or notation. On Element nodes, it always returns a string.\n return this.labelEl.textContent;\n },\n set: function (labelText) {\n this.labelEl.textContent = labelText;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCSnackbar.prototype, \"actionButtonText\", {\n get: function () {\n return this.actionEl.textContent;\n },\n set: function (actionButtonText) {\n this.actionEl.textContent = actionButtonText;\n },\n enumerable: false,\n configurable: true\n });\n MDCSnackbar.prototype.registerKeyDownHandler = function (handler) {\n this.listen('keydown', handler);\n };\n MDCSnackbar.prototype.deregisterKeyDownHandler = function (handler) {\n this.unlisten('keydown', handler);\n };\n MDCSnackbar.prototype.registerSurfaceClickHandler = function (handler) {\n this.surfaceEl.addEventListener('click', handler);\n };\n MDCSnackbar.prototype.deregisterSurfaceClickHandler = function (handler) {\n this.surfaceEl.removeEventListener('click', handler);\n };\n MDCSnackbar.prototype.isActionButton = function (target) {\n return Boolean(closest(target, ACTION_SELECTOR));\n };\n MDCSnackbar.prototype.isActionIcon = function (target) {\n return Boolean(closest(target, DISMISS_SELECTOR));\n };\n return MDCSnackbar;\n}(MDCComponent));\nexport { MDCSnackbar };\n//# sourceMappingURL=component.js.map","/**\n * @prop --snackbar-top: Snackbar has `position: fixed;` and uses `--snackbar-top`, which defaults to `auto` for its `top` property. See the examples in the documentations for further info.\n * @prop --snackbar-right: Snackbar has `position: fixed;` and uses `--snackbar-right`, which defaults to `0` for its `right` property. See the examples in the documentations for further info.\n * @prop --snackbar-bottom: Snackbar has `position: fixed;` and uses `--snackbar-bottom`, which defaults to `0` for its `bottom` property. See the examples in the documentations for further info.\n * @prop --snackbar-left: Snackbar has `position: fixed;` and uses `--snackbar-left`, which defaults to `0` for its `left` property. See the examples in the documentations for further info.\n */\n\n* {\n box-sizing: border-box;\n}\n\n.mdc-snackbar {\n top: var(--snackbar-top, auto);\n right: var(--snackbar-right, 0);\n bottom: var(--snackbar-bottom, 0);\n left: var(--snackbar-left, 0);\n\n display: none;\n position: fixed;\n z-index: 8;\n\n padding: 0.75rem;\n\n align-items: center;\n justify-content: center;\n}\n\n.mdc-snackbar--opening,\n.mdc-snackbar--open,\n.mdc-snackbar--closing {\n display: flex;\n}\n\n.mdc-snackbar--open {\n .mdc-snackbar__label,\n .mdc-snackbar__actions {\n visibility: visible;\n }\n\n .mdc-snackbar__surface {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n.mdc-snackbar__surface {\n transition:\n opacity 0.2s cubic-bezier(0, 0, 0.2, 1),\n transform 0.2s cubic-bezier(0, 0, 0.2, 1);\n padding: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 0.25rem;\n\n min-height: 3.25rem;\n min-width: unset;\n max-width: 42rem;\n\n transform: scale(0.8);\n opacity: 0;\n border-radius: 0.75rem;\n\n background-color: rgb(var(--contrast-1400));\n box-shadow: var(--shadow-depth-8), var(--shadow-depth-16);\n}\n\n.mdc-snackbar__label {\n visibility: hidden;\n\n color: rgb(var(--contrast-100));\n\n -webkit-font-smoothing: antialiased;\n font-size: 0.8125rem;\n font-weight: 400;\n padding: 0 0.25rem;\n\n width: 100%;\n flex-grow: 1;\n}\n\n.mdc-snackbar__actions {\n visibility: hidden;\n\n display: flex;\n flex-shrink: 0;\n align-items: center;\n box-sizing: border-box;\n gap: 0.5rem;\n}\n\n.dismiss,\n.mdc-snackbar__actions {\n --lime-elevated-surface-background-color: rgb(\n var(--contrast-1300)\n ); // background color of the buttons\n}\n\n.dismiss {\n --mdc-theme-on-surface: rgb(var(--contrast-100)); // color of the X icon\n --icon-background-color: var(--lime-elevated-surface-background-color);\n --fill-color: var(--mdc-theme-primary);\n --track-color: rgb(var(--contrast-800), 0.2);\n position: absolute;\n top: -0.9rem;\n left: -0.9rem;\n transform: scale(0.8);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n limel-icon-button.mdc-snackbar__dismiss {\n transform: scale(0.8);\n margin: 0;\n padding: 0;\n }\n\n svg {\n position: absolute;\n transform: rotate(90deg);\n fill: transparent;\n stroke-dasharray: 100;\n stroke-linecap: round;\n\n .mdc-snackbar--open & {\n animation: timeout var(--snackbar-timeout) linear forwards;\n }\n }\n}\n\n@keyframes timeout {\n 0% {\n stroke-width: 4;\n stroke-dashoffset: 0;\n opacity: 1;\n }\n 100% {\n stroke-width: 1;\n stroke-dashoffset: -100;\n opacity: 0.7;\n }\n}\n","import { Languages } from '../date-picker/date.types';\nimport { MDCSnackbar, MDCSnackbarCloseEvent } from '@material/snackbar';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Method,\n Prop,\n} from '@stencil/core';\nimport translate from '../../global/translations';\n\n/**\n * A Snackbar –also known as \"Toast\"– is used to inform the end user\n * about an action or a process in the system.\n * The information could vary from announcing that a process has just started,\n * is taking place now, has ended, or has been interrupted or canceled.\n *\n * The information that you provide using a snackbar should be:\n * - temporary\n * - contextual\n * - short\n * - and most importantly, ignorable.\n *\n * It means if the user misses the information, it shouldn't be a big deal.\n *\n * :::note\n * If the information you want to display has a higher importance or priority,\n * and you need to make sure that the user takes an action to dismiss it,\n * consider using the [Banner](/#/component/limel-banner/) component instead.\n * For more complex interactions and for delivering more detailed information,\n * [Dialog](/#/component/limel-dialog/) is a better choice.\n * :::\n *\n * @exampleComponent limel-example-snackbar\n * @exampleComponent limel-example-snackbar-dismissible\n * @exampleComponent limel-example-snackbar-with-action\n * @exampleComponent limel-example-snackbar-with-changing-messages\n * @exampleComponent limel-example-snackbar-positioning\n */\n\n@Component({\n tag: 'limel-snackbar',\n shadow: true,\n styleUrl: 'snackbar.scss',\n})\nexport class Snackbar {\n /**\n * The text message to display.\n */\n @Prop()\n public message: string;\n\n /**\n * The amount of time in milliseconds to show the snackbar.\n */\n @Prop()\n // eslint-disable-next-line no-magic-numbers\n public timeout?: number = 5000;\n\n /**\n * The text to display for the action button.\n */\n @Prop()\n public actionText: string;\n\n /**\n * When `true` displays a dismiss button on the snackbar,\n * allowing users to close it.\n */\n @Prop()\n public dismissible: boolean = true;\n\n /**\n * Whether to show the snackbar with space for multiple lines of text\n */\n @Prop()\n public multiline: boolean;\n\n /**\n * Defines the language for translations.\n */\n @Prop()\n public language: Languages = 'en';\n\n @Element()\n private host: HTMLLimelSnackbarElement;\n\n /**\n * Emitted when the action button is pressed\n */\n @Event()\n private action: EventEmitter<void>;\n\n /**\n * Emitted when the snackbar hides itself\n */\n @Event()\n private hide: EventEmitter<void>;\n\n private mdcSnackbar: MDCSnackbar;\n\n constructor() {\n this.handleMdcClosing = this.handleMdcClosing.bind(this);\n }\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector('.mdc-snackbar');\n if (!element) {\n return;\n }\n\n this.mdcSnackbar = new MDCSnackbar(element);\n\n this.mdcSnackbar.listen('MDCSnackbar:closing', this.handleMdcClosing);\n }\n\n public disconnectedCallback() {\n this.mdcSnackbar.unlisten('MDCSnackbar:closing', this.handleMdcClosing);\n this.mdcSnackbar.destroy();\n }\n\n /**\n * Show the snackbar\n */\n @Method()\n public async show() {\n if (this.timeout) {\n this.mdcSnackbar.timeoutMs = this.timeout;\n }\n\n this.mdcSnackbar.labelText = this.message;\n\n this.mdcSnackbar.open();\n }\n\n public render() {\n return (\n <aside\n class={`\n mdc-snackbar\n ${this.multiline ? 'mdc-snackbar--stacked' : ''}\n `}\n style={{\n '--snackbar-timeout': `${this.timeout}ms`,\n }}\n >\n <div\n class=\"mdc-snackbar__surface\"\n role=\"status\"\n aria-relevant=\"additions\"\n >\n <div class=\"mdc-snackbar__label\" aria-atomic=\"false\"></div>\n {this.renderActions(this.actionText)}\n {this.renderDismissButton(this.dismissible)}\n </div>\n </aside>\n );\n }\n\n private handleMdcClosing(event: MDCSnackbarCloseEvent) {\n if (event.detail.reason === 'action') {\n this.action.emit();\n } else {\n this.hide.emit();\n }\n }\n\n private renderActions(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <div class=\"mdc-snackbar__actions\" aria-atomic=\"true\">\n {this.renderActionButton(actionText)}\n </div>\n );\n }\n\n private renderActionButton(actionText: string) {\n if (!actionText) {\n return;\n }\n\n return (\n <limel-button\n class=\"mdc-button mdc-snackbar__action\"\n label={actionText}\n />\n );\n }\n\n private renderDismissButton(dismissible: boolean) {\n if (!dismissible) {\n return;\n }\n\n const label = translate.get('snackbar.dismiss', this.language);\n\n return (\n <div class=\"dismiss\">\n {this.renderTimeoutVisualization()}\n <limel-icon-button\n class=\"mdc-icon-button mdc-snackbar__dismiss\"\n icon=\"multiply\"\n label={label}\n />\n </div>\n );\n }\n\n private renderTimeoutVisualization() {\n return (\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\n <circle r=\"18\" cx=\"18\" cy=\"18\" fill=\"var(--track-color)\" />\n <path\n class=\"track\"\n d=\"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0\"\n stroke=\"var(--fill-color)\"\n />\n </svg>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAsBA,IAAIA,EAAa,CACbC,QAAS,wBACTC,KAAM,qBACNC,QAAS,yBAEb,IAAIC,EAAU,CACVC,gBAAiB,wBACjBC,0BAA2B,+BAC3BC,aAAc,qBACdC,cAAe,sBACfC,iBAAkB,yBAClBC,eAAgB,uBAChBC,aAAc,qBACdC,cAAe,sBACfC,cAAe,SACfC,eAAgB,UAChBC,iBAAkB,0BAEtB,IAAIC,EAAU,CACVC,gCAAiC,IACjCC,eAAgB,EAChBC,4BAA6B,IAC7BC,4BAA6B,IAE7BC,iCAAkC,GAClCC,gCAAiC,IAMjCC,mBAAoB;;;;;;;;;;;;;;;;;;;;;;GC9BxB,IAAIA,EAAqBP,EAAQO,mBACjC,IAAIjB,EAA4BF,EAAQE,0BACxC,SAASkB,EAASC,EAAQC,GACtB,GAAIA,SAAiB,EAAG,CAAEA,EAAUD,CAAO,CAC3C,IAAIE,EAAWF,EAAOG,aAAa,aAGnC,IAAIC,EAAYH,EAAQI,YAAYC,OACpC,IAAKF,IAAcF,EAAU,CACzB,MACR,CAEIF,EAAOO,aAAa,YAAa,OA4BjCN,EAAQI,YAAc,GACtBJ,EAAQO,UAAY,4EAKpBP,EAAQM,aAAa1B,EAA2BuB,GAChDK,YAAW,WAEPT,EAAOO,aAAa,YAAaL,GAEjCD,EAAQS,gBAAgB7B,GAExBoB,EAAQI,YAAcD,CAC9B,GAAON,EACP;;;;;;;;;;;;;;;;;;;;;;GCrDA,IAAIpB,EAAUH,EAAWG,QAASD,EAAOF,EAAWE,K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KAAKC,GAAG,KAAKC,KAAK,uBACpCzB,EAAA,QACIC,MAAM,QACNyB,EAAE,yDACFC,OAAO,sB"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-443111b3.js";import{c as h}from"./p-3ccdc4a3.js";import{i as n,a}from"./p-cc9ebbef.js";import"./p-4ffb9b7a.js";import{m as r}from"./p-6aa5e7b8.js";import{M as l}from"./p-9ab3a908.js";import"./p-eab67c09.js";import"./p-2ff3f85e.js";import"./p-11d5d44e.js";import"./p-dcc97cc2.js";import"./p-083d1db4.js";class o{constructor(t="en"){this.language=t}formatDate(t,i){if(t){return r(t).locale(this.getLanguage()).format(i)}return""}parseDate(t,i){if(t){return r(t,i).toDate()}return null}getLanguage(){if(this.language==="no"){return"nb"}return this.language}getDateFormat(t){return{date:"L",time:"LT",week:"[w] W GGGG",month:"MM/YYYY",quarter:"[Q]Q YYYY",year:"YYYY",datetime:"L - LT"}[t]||"L - LT"}}const d=":host(limel-date-picker){position:relative}limel-input-field[disabled],limel-input-field[readonly]{pointer-events:none}";const u={date:"date",time:"time",week:n()?"date":"week",month:"month",quarter:"date",year:"date",datetime:"datetime-local",default:"datetime-local"};const m={date:"Y-MM-DD",time:"HH:mm",week:"GGGG-[W]WW",month:"Y-MM","datetime-local":"Y-MM-DD[T]HH:mm"};const c=class{constructor(e){t(this,e);this.change=i(this,"change",7);this.portalId=`date-picker-calendar-${h()}`;this.documentClickListener=t=>{if(t.composedPath().includes(this.textField)){return}const i=document.querySelector(`#${this.portalId}`);if(!i.contains(t.target)){this.hideCalendar()}};this.formatValue=t=>this.dateFormatter.formatDate(t,this.internalFormat);this.disabled=false;this.readonly=false;this.invalid=false;this.label=undefined;this.placeholder=undefined;this.helperText=undefined;this.required=false;this.value=undefined;this.type="datetime";this.format=undefined;this.language="en";this.formatter=undefined;this.internalFormat=undefined;this.showPortal=false;this.handleCalendarChange=this.handleCalendarChange.bind(this);this.handleInputElementChange=this.handleInputElementChange.bind(this);this.showCalendar=this.showCalendar.bind(this);this.dateFormatter=new o(this.language);this.clearValue=this.clearValue.bind(this);this.hideCalendar=this.hideCalendar.bind(this);this.onInputClick=this.onInputClick.bind(this);this.nativeChangeHandler=this.nativeChangeHandler.bind(this);this.preventBlurFromCalendarContainer=this.preventBlurFromCalendarContainer.bind(this)}componentWillLoad(){this.useNative=!this.readonly&&(n()||a());this.updateInternalFormatAndType()}componentWillUpdate(){this.updateInternalFormatAndType()}render(){const t={onAction:this.clearValue};if(this.value&&!this.readonly){t.trailingIcon="clear_symbol"}if(this.useNative){return e("limel-input-field",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,helperText:this.helperText,required:this.required,value:this.formatValue(this.value),type:this.nativeType,onChange:this.nativeChangeHandler})}const i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");const s=this.formatter||this.formatValue;return[e("limel-input-field",Object.assign({disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.value?s(this.value):"",onFocus:this.showCalendar,onBlur:this.hideCalendar,onClick:this.onInputClick,onChange:this.handleInputElementChange,ref:t=>this.textField=t},t)),e("limel-portal",{containerId:this.portalId,visible:this.showPortal,containerStyle:{"z-index":i}},e("limel-flatpickr-adapter",{format:this.internalFormat,language:this.language,type:this.type,value:this.value,ref:t=>this.datePickerCalendar=t,isOpen:this.showPortal,formatter:s,onChange:this.handleCalendarChange}))]}updateInternalFormatAndType(){this.nativeType=u[this.type||"default"];this.nativeFormat=m[this.nativeType];if(this.useNative){this.internalFormat=this.nativeFormat}else if(this.formatter||this.format){this.internalFormat=this.format}else{this.internalFormat=this.dateFormatter.getDateFormat(this.type)}}nativeChangeHandler(t){t.stopPropagation();const i=this.dateFormatter.parseDate(t.detail,this.internalFormat);this.change.emit(i)}showCalendar(t){this.showPortal=true;const i=this.textField.shadowRoot.querySelector("input");setTimeout((()=>{this.datePickerCalendar.inputElement=i}));t.stopPropagation();document.addEventListener("mousedown",this.documentClickListener,{passive:true});document.addEventListener("blur",this.preventBlurFromCalendarContainer,{capture:true})}preventBlurFromCalendarContainer(t){if(t.relatedTarget===this.datePickerCalendar){t.stopPropagation()}}hideCalendar(){setTimeout((()=>{this.showPortal=false}));document.removeEventListener("mousedown",this.documentClickListener);document.removeEventListener("blur",this.preventBlurFromCalendarContainer);if(!this.pickerIsAutoClosing()){this.fixFlatpickrFocusBug()}}fixFlatpickrFocusBug(){const t=new l(this.textField.shadowRoot.querySelector(".mdc-text-field"));t.getDefaultFoundation().deactivateFocus()}handleCalendarChange(t){const i=t.detail;t.stopPropagation();if(this.pickerIsAutoClosing()){this.hideCalendar()}this.change.emit(i)}onInputClick(t){if(this.disabled||this.readonly){return}if(this.showPortal){return}this.showCalendar(t)}handleInputElementChange(t){if(t.detail===""){this.clearValue()}t.stopPropagation()}pickerIsAutoClosing(){return this.type!=="datetime"&&this.type!=="time"}clearValue(){this.change.emit(null)}get host(){return s(this)}};c.style=d;export{c as limel_date_picker};
2
- //# sourceMappingURL=p-5224d7bb.entry.js.map