@limetech/lime-elements 37.1.0-next.2 → 37.1.0-next.21

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 (231) hide show
  1. package/dist/cjs/{checkbox.template-5603ad4a.js → checkbox.template-df6fc114.js} +4 -4
  2. package/dist/cjs/checkbox.template-df6fc114.js.map +1 -0
  3. package/dist/cjs/lime-elements.cjs.js +1 -1
  4. package/dist/cjs/limel-action-bar-item_2.cjs.entry.js +9 -1
  5. package/dist/cjs/limel-action-bar-item_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-action-bar.cjs.entry.js.map +1 -1
  7. package/dist/cjs/limel-button.cjs.entry.js +3 -52
  8. package/dist/cjs/limel-button.cjs.entry.js.map +1 -1
  9. package/dist/cjs/limel-checkbox.cjs.entry.js +3 -2
  10. package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
  11. package/dist/cjs/limel-circular-progress_2.cjs.entry.js +7 -1
  12. package/dist/cjs/limel-circular-progress_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/limel-collapsible-section.cjs.entry.js +10 -0
  14. package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
  15. package/dist/cjs/limel-color-picker-palette.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-color-picker-palette.cjs.entry.js.map +1 -1
  17. package/dist/cjs/limel-color-picker.cjs.entry.js +2 -2
  18. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  19. package/dist/cjs/limel-dock-button.cjs.entry.js +8 -2
  20. package/dist/cjs/limel-dock-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/limel-form.cjs.entry.js +15 -2
  22. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  23. package/dist/cjs/limel-icon-button.cjs.entry.js +7 -0
  24. package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
  25. package/dist/cjs/limel-icon.cjs.entry.js +90 -8
  26. package/dist/cjs/limel-icon.cjs.entry.js.map +1 -1
  27. package/dist/cjs/limel-list_2.cjs.entry.js +1 -1
  28. package/dist/cjs/limel-list_2.cjs.entry.js.map +1 -1
  29. package/dist/cjs/limel-portal.cjs.entry.js +15 -14
  30. package/dist/cjs/limel-portal.cjs.entry.js.map +1 -1
  31. package/dist/cjs/limel-slider.cjs.entry.js +136 -127
  32. package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
  33. package/dist/cjs/limel-switch.cjs.entry.js +23 -10
  34. package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
  35. package/dist/cjs/limel-table.cjs.entry.js +9 -1
  36. package/dist/cjs/limel-table.cjs.entry.js.map +1 -1
  37. package/dist/cjs/limel-tooltip_2.cjs.entry.js +16 -14
  38. package/dist/cjs/limel-tooltip_2.cjs.entry.js.map +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/cjs/make-enter-clickable-59460fd6.js +80 -0
  41. package/dist/cjs/make-enter-clickable-59460fd6.js.map +1 -0
  42. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +1 -7
  43. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +11 -3
  44. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js.map +1 -1
  45. package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
  46. package/dist/collection/components/action-bar/action-bar.js +1 -2
  47. package/dist/collection/components/action-bar/action-bar.js.map +1 -1
  48. package/dist/collection/components/action-bar/action-bar.types.js.map +1 -1
  49. package/dist/collection/components/button/button.js +1 -1
  50. package/dist/collection/components/button/button.js.map +1 -1
  51. package/dist/collection/components/checkbox/checkbox.js +18 -1
  52. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  53. package/dist/collection/components/checkbox/checkbox.template.js +3 -3
  54. package/dist/collection/components/checkbox/checkbox.template.js.map +1 -1
  55. package/dist/collection/components/collapsible-section/collapsible-section.js +11 -1
  56. package/dist/collection/components/collapsible-section/collapsible-section.js.map +1 -1
  57. package/dist/collection/components/color-picker/color-picker-palette.css +46 -21
  58. package/dist/collection/components/color-picker/color-picker-palette.js +1 -1
  59. package/dist/collection/components/color-picker/color-picker-palette.js.map +1 -1
  60. package/dist/collection/components/color-picker/color-picker.css +29 -21
  61. package/dist/collection/components/color-picker/color-picker.js +1 -1
  62. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  63. package/dist/collection/components/dock/dock-button/dock-button.js +8 -2
  64. package/dist/collection/components/dock/dock-button/dock-button.js.map +1 -1
  65. package/dist/collection/components/form/fields/schema-field.js +13 -1
  66. package/dist/collection/components/form/fields/schema-field.js.map +1 -1
  67. package/dist/collection/components/form/form.css +4 -0
  68. package/dist/collection/components/form/widgets/select.js +1 -0
  69. package/dist/collection/components/form/widgets/select.js.map +1 -1
  70. package/dist/collection/components/icon/icon.js +1 -1
  71. package/dist/collection/components/icon/icon.js.map +1 -1
  72. package/dist/collection/components/icon-button/icon-button.js +7 -0
  73. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  74. package/dist/collection/components/linear-progress/linear-progress.js +9 -3
  75. package/dist/collection/components/linear-progress/linear-progress.js.map +1 -1
  76. package/dist/collection/components/list/list.js +1 -1
  77. package/dist/collection/components/list/list.js.map +1 -1
  78. package/dist/collection/components/portal/portal.js +41 -20
  79. package/dist/collection/components/portal/portal.js.map +1 -1
  80. package/dist/collection/components/slider/slider.js +140 -131
  81. package/dist/collection/components/slider/slider.js.map +1 -1
  82. package/dist/collection/components/switch/switch.css +22 -1
  83. package/dist/collection/components/switch/switch.js +50 -10
  84. package/dist/collection/components/switch/switch.js.map +1 -1
  85. package/dist/collection/components/table/table.css +43 -30
  86. package/dist/collection/components/table/table.js +8 -0
  87. package/dist/collection/components/table/table.js.map +1 -1
  88. package/dist/collection/components/tooltip/tooltip-content.css +1 -1
  89. package/dist/collection/components/tooltip/tooltip.css +3 -2
  90. package/dist/collection/components/tooltip/tooltip.js +41 -16
  91. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  92. package/dist/collection/global/{icon-cache.js → icon-cache/cache-storage-icon-cache.js} +4 -9
  93. package/dist/collection/global/icon-cache/cache-storage-icon-cache.js.map +1 -0
  94. package/dist/collection/global/icon-cache/factory.js +16 -0
  95. package/dist/collection/global/icon-cache/factory.js.map +1 -0
  96. package/dist/collection/global/icon-cache/in-memory-icon-cache.js +73 -0
  97. package/dist/collection/global/icon-cache/in-memory-icon-cache.js.map +1 -0
  98. package/dist/collection/util/make-enter-clickable.js +73 -0
  99. package/dist/collection/util/make-enter-clickable.js.map +1 -0
  100. package/dist/esm/{checkbox.template-a5d8a2bc.js → checkbox.template-c2d0fa10.js} +4 -4
  101. package/dist/esm/checkbox.template-c2d0fa10.js.map +1 -0
  102. package/dist/esm/lime-elements.js +1 -1
  103. package/dist/esm/limel-action-bar-item_2.entry.js +10 -2
  104. package/dist/esm/limel-action-bar-item_2.entry.js.map +1 -1
  105. package/dist/esm/limel-action-bar.entry.js.map +1 -1
  106. package/dist/esm/limel-button.entry.js +2 -51
  107. package/dist/esm/limel-button.entry.js.map +1 -1
  108. package/dist/esm/limel-checkbox.entry.js +3 -2
  109. package/dist/esm/limel-checkbox.entry.js.map +1 -1
  110. package/dist/esm/limel-circular-progress_2.entry.js +7 -1
  111. package/dist/esm/limel-circular-progress_2.entry.js.map +1 -1
  112. package/dist/esm/limel-collapsible-section.entry.js +11 -1
  113. package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
  114. package/dist/esm/limel-color-picker-palette.entry.js +2 -2
  115. package/dist/esm/limel-color-picker-palette.entry.js.map +1 -1
  116. package/dist/esm/limel-color-picker.entry.js +2 -2
  117. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  118. package/dist/esm/limel-dock-button.entry.js +8 -2
  119. package/dist/esm/limel-dock-button.entry.js.map +1 -1
  120. package/dist/esm/limel-form.entry.js +15 -2
  121. package/dist/esm/limel-form.entry.js.map +1 -1
  122. package/dist/esm/limel-icon-button.entry.js +7 -0
  123. package/dist/esm/limel-icon-button.entry.js.map +1 -1
  124. package/dist/esm/limel-icon.entry.js +90 -8
  125. package/dist/esm/limel-icon.entry.js.map +1 -1
  126. package/dist/esm/limel-list_2.entry.js +1 -1
  127. package/dist/esm/limel-list_2.entry.js.map +1 -1
  128. package/dist/esm/limel-portal.entry.js +15 -14
  129. package/dist/esm/limel-portal.entry.js.map +1 -1
  130. package/dist/esm/limel-slider.entry.js +136 -127
  131. package/dist/esm/limel-slider.entry.js.map +1 -1
  132. package/dist/esm/limel-switch.entry.js +24 -11
  133. package/dist/esm/limel-switch.entry.js.map +1 -1
  134. package/dist/esm/limel-table.entry.js +9 -1
  135. package/dist/esm/limel-table.entry.js.map +1 -1
  136. package/dist/esm/limel-tooltip_2.entry.js +16 -14
  137. package/dist/esm/limel-tooltip_2.entry.js.map +1 -1
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/make-enter-clickable-0473e94a.js +77 -0
  140. package/dist/esm/make-enter-clickable-0473e94a.js.map +1 -0
  141. package/dist/lime-elements/lime-elements.esm.js +1 -1
  142. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  143. package/dist/lime-elements/{p-c6d57502.entry.js → p-0d823554.entry.js} +2 -2
  144. package/dist/lime-elements/p-0d823554.entry.js.map +1 -0
  145. package/dist/lime-elements/p-15e3028f.entry.js +2 -0
  146. package/dist/lime-elements/p-15e3028f.entry.js.map +1 -0
  147. package/dist/lime-elements/{p-9c1db0e7.entry.js → p-3bb15bdf.entry.js} +2 -2
  148. package/dist/lime-elements/p-3bb15bdf.entry.js.map +1 -0
  149. package/dist/lime-elements/p-4607900f.entry.js +2 -0
  150. package/dist/lime-elements/p-4607900f.entry.js.map +1 -0
  151. package/dist/lime-elements/{p-71210c65.entry.js → p-55dcbc35.entry.js} +2 -2
  152. package/dist/lime-elements/{p-71210c65.entry.js.map → p-55dcbc35.entry.js.map} +1 -1
  153. package/dist/lime-elements/p-7cfc8998.js +2 -0
  154. package/dist/lime-elements/p-7cfc8998.js.map +1 -0
  155. package/dist/lime-elements/{p-bb1b12bb.entry.js → p-88e4eba7.entry.js} +8 -8
  156. package/dist/lime-elements/p-88e4eba7.entry.js.map +1 -0
  157. package/dist/lime-elements/{p-eae4f1ed.entry.js → p-8f08ca13.entry.js} +2 -2
  158. package/dist/lime-elements/p-8f08ca13.entry.js.map +1 -0
  159. package/dist/lime-elements/{p-7d159ddf.entry.js → p-95769bf5.entry.js} +2 -2
  160. package/dist/lime-elements/p-95769bf5.entry.js.map +1 -0
  161. package/dist/lime-elements/p-addb4c84.entry.js +2 -0
  162. package/dist/lime-elements/p-addb4c84.entry.js.map +1 -0
  163. package/dist/lime-elements/p-b714596f.entry.js.map +1 -1
  164. package/dist/lime-elements/p-c3e428ff.entry.js +2 -0
  165. package/dist/lime-elements/p-c3e428ff.entry.js.map +1 -0
  166. package/dist/lime-elements/{p-0f1a9472.entry.js → p-c6f8ea40.entry.js} +6 -6
  167. package/dist/lime-elements/p-c6f8ea40.entry.js.map +1 -0
  168. package/dist/lime-elements/p-d028b08d.js +2 -0
  169. package/dist/lime-elements/p-d028b08d.js.map +1 -0
  170. package/dist/lime-elements/{p-42f06b16.entry.js → p-d5298b7e.entry.js} +2 -2
  171. package/dist/lime-elements/p-d5298b7e.entry.js.map +1 -0
  172. package/dist/lime-elements/p-d8826406.entry.js +2 -0
  173. package/dist/lime-elements/p-d8826406.entry.js.map +1 -0
  174. package/dist/lime-elements/{p-be492c93.entry.js → p-d9d4b3bf.entry.js} +2 -2
  175. package/dist/lime-elements/{p-be492c93.entry.js.map → p-d9d4b3bf.entry.js.map} +1 -1
  176. package/dist/lime-elements/p-db30704e.entry.js +2 -0
  177. package/dist/lime-elements/p-db30704e.entry.js.map +1 -0
  178. package/dist/lime-elements/p-e0a0065f.entry.js +2 -0
  179. package/dist/lime-elements/p-e0a0065f.entry.js.map +1 -0
  180. package/dist/lime-elements/{p-a4c39571.entry.js → p-f1b0951f.entry.js} +5 -5
  181. package/dist/lime-elements/p-f1b0951f.entry.js.map +1 -0
  182. package/dist/types/components/action-bar/action-bar-item/action-bar-item.d.ts +3 -0
  183. package/dist/types/components/action-bar/action-bar.d.ts +0 -1
  184. package/dist/types/components/action-bar/action-bar.types.d.ts +12 -6
  185. package/dist/types/components/checkbox/checkbox.d.ts +17 -0
  186. package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
  187. package/dist/types/components/collapsible-section/collapsible-section.d.ts +3 -0
  188. package/dist/types/components/dock/dock-button/dock-button.d.ts +1 -0
  189. package/dist/types/components/icon-button/icon-button.d.ts +2 -0
  190. package/dist/types/components/linear-progress/linear-progress.d.ts +1 -0
  191. package/dist/types/components/list/list.d.ts +2 -1
  192. package/dist/types/components/portal/portal.d.ts +8 -3
  193. package/dist/types/components/slider/slider.d.ts +13 -11
  194. package/dist/types/components/switch/switch.d.ts +19 -1
  195. package/dist/types/components/tooltip/tooltip.d.ts +13 -6
  196. package/dist/types/components.d.ts +129 -29
  197. package/dist/types/global/{icon-cache.d.ts → icon-cache/cache-storage-icon-cache.d.ts} +2 -4
  198. package/dist/types/global/icon-cache/factory.d.ts +4 -0
  199. package/dist/types/global/icon-cache/in-memory-icon-cache.d.ts +15 -0
  200. package/dist/types/util/make-enter-clickable.d.ts +7 -0
  201. package/package.json +10 -10
  202. package/dist/cjs/checkbox.template-5603ad4a.js.map +0 -1
  203. package/dist/collection/global/icon-cache.js.map +0 -1
  204. package/dist/collection/util/makeEnterClickable.js +0 -51
  205. package/dist/collection/util/makeEnterClickable.js.map +0 -1
  206. package/dist/esm/checkbox.template-a5d8a2bc.js.map +0 -1
  207. package/dist/lime-elements/p-0f1a9472.entry.js.map +0 -1
  208. package/dist/lime-elements/p-149f2418.entry.js +0 -2
  209. package/dist/lime-elements/p-149f2418.entry.js.map +0 -1
  210. package/dist/lime-elements/p-42f06b16.entry.js.map +0 -1
  211. package/dist/lime-elements/p-7d159ddf.entry.js.map +0 -1
  212. package/dist/lime-elements/p-8be4072e.entry.js +0 -2
  213. package/dist/lime-elements/p-8be4072e.entry.js.map +0 -1
  214. package/dist/lime-elements/p-908640f6.entry.js +0 -2
  215. package/dist/lime-elements/p-908640f6.entry.js.map +0 -1
  216. package/dist/lime-elements/p-9c1db0e7.entry.js.map +0 -1
  217. package/dist/lime-elements/p-9ceb4364.entry.js +0 -2
  218. package/dist/lime-elements/p-9ceb4364.entry.js.map +0 -1
  219. package/dist/lime-elements/p-a4c39571.entry.js.map +0 -1
  220. package/dist/lime-elements/p-b2d4f3f0.js +0 -2
  221. package/dist/lime-elements/p-b2d4f3f0.js.map +0 -1
  222. package/dist/lime-elements/p-b3ff8fef.entry.js +0 -2
  223. package/dist/lime-elements/p-b3ff8fef.entry.js.map +0 -1
  224. package/dist/lime-elements/p-bb1b12bb.entry.js.map +0 -1
  225. package/dist/lime-elements/p-c018e82f.entry.js +0 -2
  226. package/dist/lime-elements/p-c018e82f.entry.js.map +0 -1
  227. package/dist/lime-elements/p-c6d57502.entry.js.map +0 -1
  228. package/dist/lime-elements/p-de4cb1ac.entry.js +0 -2
  229. package/dist/lime-elements/p-de4cb1ac.entry.js.map +0 -1
  230. package/dist/lime-elements/p-eae4f1ed.entry.js.map +0 -1
  231. package/dist/types/util/makeEnterClickable.d.ts +0 -2
@@ -1,3 +1,5 @@
1
+ import { JSX } from 'react';
2
+ import { OpenDirection } from '../menu/menu.types';
1
3
  /**
2
4
  * A tooltip can be used to display a descriptive text for any element.
3
5
  * The displayed content must be a brief and supplemental string of text,
@@ -14,8 +16,9 @@
14
16
  *
15
17
  * :::note
16
18
  * In order to display the tooltip, the tooltip element and its trigger element
17
- * must be within the same document or document fragment.
18
- * A good practice is to just place them next to each other like below:
19
+ * must be within the same document or document fragment (the same shadowRoot).
20
+ * Often, it's easiest to just place them next to each other like in the example
21
+ * below, but if you need to, you can place them differently.
19
22
  *
20
23
  * ```html
21
24
  * <limel-button icon="search" id="tooltip-example" />
@@ -36,10 +39,9 @@
36
39
  * use that, not a tooltip.
37
40
  * - Make sure to use the tooltip on an element that users naturally and
38
41
  * effortlessly recognize can be hovered.
39
- * @exampleComponent limel-example-tooltip
42
+ * @exampleComponent limel-example-tooltip-basic
40
43
  * @exampleComponent limel-example-tooltip-max-character
41
44
  * @exampleComponent limel-example-tooltip-composite
42
- * @private
43
45
  */
44
46
  export declare class Tooltip {
45
47
  /**
@@ -63,15 +65,20 @@ export declare class Tooltip {
63
65
  * 'helperLabel' in two rows.
64
66
  */
65
67
  maxlength?: number;
66
- private open;
68
+ /**
69
+ * Decides the tooltip's location in relation to its trigger.
70
+ */
71
+ openDirection: OpenDirection;
67
72
  private host;
73
+ private open;
68
74
  private portalId;
69
75
  private tooltipId;
70
76
  private showTooltipTimeoutHandle;
77
+ private ownerElement;
71
78
  constructor();
72
79
  connectedCallback(): void;
73
80
  disconnectedCallback(): void;
74
- render(): any;
81
+ render(): JSX.Element;
75
82
  private setOwnerAriaLabel;
76
83
  private addListeners;
77
84
  private removeListeners;
@@ -66,7 +66,6 @@ export namespace Components {
66
66
  * @exampleComponent limel-example-action-bar-floating
67
67
  * @exampleComponent limel-example-action-bar-styling
68
68
  * @exampleComponent limel-example-action-bar-as-primary-component
69
- * @private
70
69
  */
71
70
  interface LimelActionBar {
72
71
  /**
@@ -272,6 +271,18 @@ export namespace Components {
272
271
  "type"?: CalloutType;
273
272
  }
274
273
  /**
274
+ * The Checkbox component is a classic and essential element in UI design that allows
275
+ * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to
276
+ * select one or more items from a list of choices.
277
+ * ## States of a Checkbox
278
+ * When a user clicks or taps on the box, it toggles between two states:
279
+ * Checked and Unchecked.
280
+ * However, a Checkbox can visualize a third state called the "Indeterminate" state.
281
+ * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.
282
+ * The Indeterminate state is typically used when dealing with checkbox groups
283
+ * that have hierarchical relationships or when the group contains sub-items.
284
+ * This state is used to indicate that that some, but not all, of the items in a group are selected.
285
+ * <limel-example-switch-vs-checkbox />
275
286
  * @exampleComponent limel-example-checkbox
276
287
  * @exampleComponent limel-example-checkbox-helper-text
277
288
  */
@@ -1511,9 +1522,13 @@ export namespace Components {
1511
1522
  * to do any tear-down, the appropriate setup will have to be done again on
1512
1523
  * `connectedCallback`.
1513
1524
  * @private
1514
- * @exampleComponent limel-example-portal
1525
+ * @exampleComponent limel-example-portal-basic
1515
1526
  */
1516
1527
  interface LimelPortal {
1528
+ /**
1529
+ * The element that the content should be positioned relative to. Defaults to the limel-portal element.
1530
+ */
1531
+ "anchor"?: HTMLElement;
1517
1532
  /**
1518
1533
  * A unique ID.
1519
1534
  */
@@ -1666,7 +1681,7 @@ export namespace Components {
1666
1681
  "link"?: Link;
1667
1682
  }
1668
1683
  /**
1669
- * @exampleComponent limel-example-slider
1684
+ * @exampleComponent limel-example-slider-basic
1670
1685
  * @exampleComponent limel-example-slider-multiplier
1671
1686
  * @exampleComponent limel-example-slider-multiplier-percentage-colors
1672
1687
  * @exampleComponent limel-example-slider-composite
@@ -1818,13 +1833,25 @@ export namespace Components {
1818
1833
  "primary": boolean;
1819
1834
  }
1820
1835
  /**
1836
+ * The Switch component is a fundamental element in UI design that serves as a toggle switch
1837
+ * to control the state of a specific setting or option in an application or website.
1838
+ * The two distinct positions of the Switch are visually indicative of the two states:
1839
+ * ON and OFF; making it easy for users to understand the current state of the controlled feature.
1840
+ * The Switch component is widely used in user interfaces to enable users to
1841
+ * quickly and intuitively change binary settings.
1842
+ * <limel-example-switch-vs-checkbox />
1821
1843
  * @exampleComponent limel-example-switch
1844
+ * @exampleComponent limel-example-switch-helper-text
1822
1845
  */
1823
1846
  interface LimelSwitch {
1824
1847
  /**
1825
1848
  * Disables the switch when `true`, and visually shows that the switch is editable but disabled. This tells the users that if certain requirements are met, the switch may become interactable.
1826
1849
  */
1827
1850
  "disabled": boolean;
1851
+ /**
1852
+ * Optional helper text to display below the switch
1853
+ */
1854
+ "helperText": string;
1828
1855
  /**
1829
1856
  * Label to display next to the switch
1830
1857
  */
@@ -1976,8 +2003,9 @@ export namespace Components {
1976
2003
  * to it.
1977
2004
  * :::note
1978
2005
  * In order to display the tooltip, the tooltip element and its trigger element
1979
- * must be within the same document or document fragment.
1980
- * A good practice is to just place them next to each other like below:
2006
+ * must be within the same document or document fragment (the same shadowRoot).
2007
+ * Often, it's easiest to just place them next to each other like in the example
2008
+ * below, but if you need to, you can place them differently.
1981
2009
  * ```html
1982
2010
  * <limel-button icon="search" id="tooltip-example" />
1983
2011
  * <limel-tooltip label="Search" elementId="tooltip-example" />
@@ -1996,10 +2024,9 @@ export namespace Components {
1996
2024
  * use that, not a tooltip.
1997
2025
  * - Make sure to use the tooltip on an element that users naturally and
1998
2026
  * effortlessly recognize can be hovered.
1999
- * @exampleComponent limel-example-tooltip
2027
+ * @exampleComponent limel-example-tooltip-basic
2000
2028
  * @exampleComponent limel-example-tooltip-max-character
2001
2029
  * @exampleComponent limel-example-tooltip-composite
2002
- * @private
2003
2030
  */
2004
2031
  interface LimelTooltip {
2005
2032
  /**
@@ -2018,6 +2045,10 @@ export namespace Components {
2018
2045
  * The maximum amount of characters before rendering 'label' and 'helperLabel' in two rows.
2019
2046
  */
2020
2047
  "maxlength"?: number;
2048
+ /**
2049
+ * Decides the tooltip's location in relation to its trigger.
2050
+ */
2051
+ "openDirection": OpenDirection;
2021
2052
  }
2022
2053
  /**
2023
2054
  * This component is used internally by `limel-tooltip`.
@@ -2195,7 +2226,6 @@ declare global {
2195
2226
  * @exampleComponent limel-example-action-bar-floating
2196
2227
  * @exampleComponent limel-example-action-bar-styling
2197
2228
  * @exampleComponent limel-example-action-bar-as-primary-component
2198
- * @private
2199
2229
  */
2200
2230
  interface HTMLLimelActionBarElement extends Components.LimelActionBar, HTMLStencilElement {
2201
2231
  }
@@ -2329,6 +2359,18 @@ declare global {
2329
2359
  new (): HTMLLimelCalloutElement;
2330
2360
  };
2331
2361
  /**
2362
+ * The Checkbox component is a classic and essential element in UI design that allows
2363
+ * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to
2364
+ * select one or more items from a list of choices.
2365
+ * ## States of a Checkbox
2366
+ * When a user clicks or taps on the box, it toggles between two states:
2367
+ * Checked and Unchecked.
2368
+ * However, a Checkbox can visualize a third state called the "Indeterminate" state.
2369
+ * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.
2370
+ * The Indeterminate state is typically used when dealing with checkbox groups
2371
+ * that have hierarchical relationships or when the group contains sub-items.
2372
+ * This state is used to indicate that that some, but not all, of the items in a group are selected.
2373
+ * <limel-example-switch-vs-checkbox />
2332
2374
  * @exampleComponent limel-example-checkbox
2333
2375
  * @exampleComponent limel-example-checkbox-helper-text
2334
2376
  */
@@ -2936,7 +2978,7 @@ declare global {
2936
2978
  * to do any tear-down, the appropriate setup will have to be done again on
2937
2979
  * `connectedCallback`.
2938
2980
  * @private
2939
- * @exampleComponent limel-example-portal
2981
+ * @exampleComponent limel-example-portal-basic
2940
2982
  */
2941
2983
  interface HTMLLimelPortalElement extends Components.LimelPortal, HTMLStencilElement {
2942
2984
  }
@@ -3003,7 +3045,7 @@ declare global {
3003
3045
  new (): HTMLLimelShortcutElement;
3004
3046
  };
3005
3047
  /**
3006
- * @exampleComponent limel-example-slider
3048
+ * @exampleComponent limel-example-slider-basic
3007
3049
  * @exampleComponent limel-example-slider-multiplier
3008
3050
  * @exampleComponent limel-example-slider-multiplier-percentage-colors
3009
3051
  * @exampleComponent limel-example-slider-composite
@@ -3075,7 +3117,15 @@ declare global {
3075
3117
  new (): HTMLLimelSplitButtonElement;
3076
3118
  };
3077
3119
  /**
3120
+ * The Switch component is a fundamental element in UI design that serves as a toggle switch
3121
+ * to control the state of a specific setting or option in an application or website.
3122
+ * The two distinct positions of the Switch are visually indicative of the two states:
3123
+ * ON and OFF; making it easy for users to understand the current state of the controlled feature.
3124
+ * The Switch component is widely used in user interfaces to enable users to
3125
+ * quickly and intuitively change binary settings.
3126
+ * <limel-example-switch-vs-checkbox />
3078
3127
  * @exampleComponent limel-example-switch
3128
+ * @exampleComponent limel-example-switch-helper-text
3079
3129
  */
3080
3130
  interface HTMLLimelSwitchElement extends Components.LimelSwitch, HTMLStencilElement {
3081
3131
  }
@@ -3165,8 +3215,9 @@ declare global {
3165
3215
  * to it.
3166
3216
  * :::note
3167
3217
  * In order to display the tooltip, the tooltip element and its trigger element
3168
- * must be within the same document or document fragment.
3169
- * A good practice is to just place them next to each other like below:
3218
+ * must be within the same document or document fragment (the same shadowRoot).
3219
+ * Often, it's easiest to just place them next to each other like in the example
3220
+ * below, but if you need to, you can place them differently.
3170
3221
  * ```html
3171
3222
  * <limel-button icon="search" id="tooltip-example" />
3172
3223
  * <limel-tooltip label="Search" elementId="tooltip-example" />
@@ -3185,10 +3236,9 @@ declare global {
3185
3236
  * use that, not a tooltip.
3186
3237
  * - Make sure to use the tooltip on an element that users naturally and
3187
3238
  * effortlessly recognize can be hovered.
3188
- * @exampleComponent limel-example-tooltip
3239
+ * @exampleComponent limel-example-tooltip-basic
3189
3240
  * @exampleComponent limel-example-tooltip-max-character
3190
3241
  * @exampleComponent limel-example-tooltip-composite
3191
- * @private
3192
3242
  */
3193
3243
  interface HTMLLimelTooltipElement extends Components.LimelTooltip, HTMLStencilElement {
3194
3244
  }
@@ -3284,7 +3334,6 @@ declare namespace LocalJSX {
3284
3334
  * @exampleComponent limel-example-action-bar-floating
3285
3335
  * @exampleComponent limel-example-action-bar-styling
3286
3336
  * @exampleComponent limel-example-action-bar-as-primary-component
3287
- * @private
3288
3337
  */
3289
3338
  interface LimelActionBar {
3290
3339
  /**
@@ -3495,6 +3544,18 @@ declare namespace LocalJSX {
3495
3544
  "type"?: CalloutType;
3496
3545
  }
3497
3546
  /**
3547
+ * The Checkbox component is a classic and essential element in UI design that allows
3548
+ * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to
3549
+ * select one or more items from a list of choices.
3550
+ * ## States of a Checkbox
3551
+ * When a user clicks or taps on the box, it toggles between two states:
3552
+ * Checked and Unchecked.
3553
+ * However, a Checkbox can visualize a third state called the "Indeterminate" state.
3554
+ * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.
3555
+ * The Indeterminate state is typically used when dealing with checkbox groups
3556
+ * that have hierarchical relationships or when the group contains sub-items.
3557
+ * This state is used to indicate that that some, but not all, of the items in a group are selected.
3558
+ * <limel-example-switch-vs-checkbox />
3498
3559
  * @exampleComponent limel-example-checkbox
3499
3560
  * @exampleComponent limel-example-checkbox-helper-text
3500
3561
  */
@@ -4603,7 +4664,7 @@ declare namespace LocalJSX {
4603
4664
  */
4604
4665
  "maxLinesSecondaryText"?: number;
4605
4666
  /**
4606
- * Fired when a new value has been selected from the list. Only fired if selectable is set to true
4667
+ * Fired when a new value has been selected from the list. Only fired if `type` is set to `selectable`, `radio` or `checkbox`.
4607
4668
  */
4608
4669
  "onChange"?: (event: LimelListCustomEvent<ListItem | ListItem[]>) => void;
4609
4670
  /**
@@ -4874,9 +4935,13 @@ declare namespace LocalJSX {
4874
4935
  * to do any tear-down, the appropriate setup will have to be done again on
4875
4936
  * `connectedCallback`.
4876
4937
  * @private
4877
- * @exampleComponent limel-example-portal
4938
+ * @exampleComponent limel-example-portal-basic
4878
4939
  */
4879
4940
  interface LimelPortal {
4941
+ /**
4942
+ * The element that the content should be positioned relative to. Defaults to the limel-portal element.
4943
+ */
4944
+ "anchor"?: HTMLElement;
4880
4945
  /**
4881
4946
  * A unique ID.
4882
4947
  */
@@ -5041,7 +5106,7 @@ declare namespace LocalJSX {
5041
5106
  "link"?: Link;
5042
5107
  }
5043
5108
  /**
5044
- * @exampleComponent limel-example-slider
5109
+ * @exampleComponent limel-example-slider-basic
5045
5110
  * @exampleComponent limel-example-slider-multiplier
5046
5111
  * @exampleComponent limel-example-slider-multiplier-percentage-colors
5047
5112
  * @exampleComponent limel-example-slider-composite
@@ -5205,13 +5270,25 @@ declare namespace LocalJSX {
5205
5270
  "primary"?: boolean;
5206
5271
  }
5207
5272
  /**
5273
+ * The Switch component is a fundamental element in UI design that serves as a toggle switch
5274
+ * to control the state of a specific setting or option in an application or website.
5275
+ * The two distinct positions of the Switch are visually indicative of the two states:
5276
+ * ON and OFF; making it easy for users to understand the current state of the controlled feature.
5277
+ * The Switch component is widely used in user interfaces to enable users to
5278
+ * quickly and intuitively change binary settings.
5279
+ * <limel-example-switch-vs-checkbox />
5208
5280
  * @exampleComponent limel-example-switch
5281
+ * @exampleComponent limel-example-switch-helper-text
5209
5282
  */
5210
5283
  interface LimelSwitch {
5211
5284
  /**
5212
5285
  * Disables the switch when `true`, and visually shows that the switch is editable but disabled. This tells the users that if certain requirements are met, the switch may become interactable.
5213
5286
  */
5214
5287
  "disabled"?: boolean;
5288
+ /**
5289
+ * Optional helper text to display below the switch
5290
+ */
5291
+ "helperText"?: string;
5215
5292
  /**
5216
5293
  * Label to display next to the switch
5217
5294
  */
@@ -5403,8 +5480,9 @@ declare namespace LocalJSX {
5403
5480
  * to it.
5404
5481
  * :::note
5405
5482
  * In order to display the tooltip, the tooltip element and its trigger element
5406
- * must be within the same document or document fragment.
5407
- * A good practice is to just place them next to each other like below:
5483
+ * must be within the same document or document fragment (the same shadowRoot).
5484
+ * Often, it's easiest to just place them next to each other like in the example
5485
+ * below, but if you need to, you can place them differently.
5408
5486
  * ```html
5409
5487
  * <limel-button icon="search" id="tooltip-example" />
5410
5488
  * <limel-tooltip label="Search" elementId="tooltip-example" />
@@ -5423,10 +5501,9 @@ declare namespace LocalJSX {
5423
5501
  * use that, not a tooltip.
5424
5502
  * - Make sure to use the tooltip on an element that users naturally and
5425
5503
  * effortlessly recognize can be hovered.
5426
- * @exampleComponent limel-example-tooltip
5504
+ * @exampleComponent limel-example-tooltip-basic
5427
5505
  * @exampleComponent limel-example-tooltip-max-character
5428
5506
  * @exampleComponent limel-example-tooltip-composite
5429
- * @private
5430
5507
  */
5431
5508
  interface LimelTooltip {
5432
5509
  /**
@@ -5445,6 +5522,10 @@ declare namespace LocalJSX {
5445
5522
  * The maximum amount of characters before rendering 'label' and 'helperLabel' in two rows.
5446
5523
  */
5447
5524
  "maxlength"?: number;
5525
+ /**
5526
+ * Decides the tooltip's location in relation to its trigger.
5527
+ */
5528
+ "openDirection"?: OpenDirection;
5448
5529
  }
5449
5530
  /**
5450
5531
  * This component is used internally by `limel-tooltip`.
@@ -5545,7 +5626,6 @@ declare module "@stencil/core" {
5545
5626
  * @exampleComponent limel-example-action-bar-floating
5546
5627
  * @exampleComponent limel-example-action-bar-styling
5547
5628
  * @exampleComponent limel-example-action-bar-as-primary-component
5548
- * @private
5549
5629
  */
5550
5630
  "limel-action-bar": LocalJSX.LimelActionBar & JSXBase.HTMLAttributes<HTMLLimelActionBarElement>;
5551
5631
  /**
@@ -5639,6 +5719,18 @@ declare module "@stencil/core" {
5639
5719
  */
5640
5720
  "limel-callout": LocalJSX.LimelCallout & JSXBase.HTMLAttributes<HTMLLimelCalloutElement>;
5641
5721
  /**
5722
+ * The Checkbox component is a classic and essential element in UI design that allows
5723
+ * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to
5724
+ * select one or more items from a list of choices.
5725
+ * ## States of a Checkbox
5726
+ * When a user clicks or taps on the box, it toggles between two states:
5727
+ * Checked and Unchecked.
5728
+ * However, a Checkbox can visualize a third state called the "Indeterminate" state.
5729
+ * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it.
5730
+ * The Indeterminate state is typically used when dealing with checkbox groups
5731
+ * that have hierarchical relationships or when the group contains sub-items.
5732
+ * This state is used to indicate that that some, but not all, of the items in a group are selected.
5733
+ * <limel-example-switch-vs-checkbox />
5642
5734
  * @exampleComponent limel-example-checkbox
5643
5735
  * @exampleComponent limel-example-checkbox-helper-text
5644
5736
  */
@@ -6091,7 +6183,7 @@ declare module "@stencil/core" {
6091
6183
  * to do any tear-down, the appropriate setup will have to be done again on
6092
6184
  * `connectedCallback`.
6093
6185
  * @private
6094
- * @exampleComponent limel-example-portal
6186
+ * @exampleComponent limel-example-portal-basic
6095
6187
  */
6096
6188
  "limel-portal": LocalJSX.LimelPortal & JSXBase.HTMLAttributes<HTMLLimelPortalElement>;
6097
6189
  /**
@@ -6133,7 +6225,7 @@ declare module "@stencil/core" {
6133
6225
  */
6134
6226
  "limel-shortcut": LocalJSX.LimelShortcut & JSXBase.HTMLAttributes<HTMLLimelShortcutElement>;
6135
6227
  /**
6136
- * @exampleComponent limel-example-slider
6228
+ * @exampleComponent limel-example-slider-basic
6137
6229
  * @exampleComponent limel-example-slider-multiplier
6138
6230
  * @exampleComponent limel-example-slider-multiplier-percentage-colors
6139
6231
  * @exampleComponent limel-example-slider-composite
@@ -6185,7 +6277,15 @@ declare module "@stencil/core" {
6185
6277
  */
6186
6278
  "limel-split-button": LocalJSX.LimelSplitButton & JSXBase.HTMLAttributes<HTMLLimelSplitButtonElement>;
6187
6279
  /**
6280
+ * The Switch component is a fundamental element in UI design that serves as a toggle switch
6281
+ * to control the state of a specific setting or option in an application or website.
6282
+ * The two distinct positions of the Switch are visually indicative of the two states:
6283
+ * ON and OFF; making it easy for users to understand the current state of the controlled feature.
6284
+ * The Switch component is widely used in user interfaces to enable users to
6285
+ * quickly and intuitively change binary settings.
6286
+ * <limel-example-switch-vs-checkbox />
6188
6287
  * @exampleComponent limel-example-switch
6288
+ * @exampleComponent limel-example-switch-helper-text
6189
6289
  */
6190
6290
  "limel-switch": LocalJSX.LimelSwitch & JSXBase.HTMLAttributes<HTMLLimelSwitchElement>;
6191
6291
  /**
@@ -6255,8 +6355,9 @@ declare module "@stencil/core" {
6255
6355
  * to it.
6256
6356
  * :::note
6257
6357
  * In order to display the tooltip, the tooltip element and its trigger element
6258
- * must be within the same document or document fragment.
6259
- * A good practice is to just place them next to each other like below:
6358
+ * must be within the same document or document fragment (the same shadowRoot).
6359
+ * Often, it's easiest to just place them next to each other like in the example
6360
+ * below, but if you need to, you can place them differently.
6260
6361
  * ```html
6261
6362
  * <limel-button icon="search" id="tooltip-example" />
6262
6363
  * <limel-tooltip label="Search" elementId="tooltip-example" />
@@ -6275,10 +6376,9 @@ declare module "@stencil/core" {
6275
6376
  * use that, not a tooltip.
6276
6377
  * - Make sure to use the tooltip on an element that users naturally and
6277
6378
  * effortlessly recognize can be hovered.
6278
- * @exampleComponent limel-example-tooltip
6379
+ * @exampleComponent limel-example-tooltip-basic
6279
6380
  * @exampleComponent limel-example-tooltip-max-character
6280
6381
  * @exampleComponent limel-example-tooltip-composite
6281
- * @private
6282
6382
  */
6283
6383
  "limel-tooltip": LocalJSX.LimelTooltip & JSXBase.HTMLAttributes<HTMLLimelTooltipElement>;
6284
6384
  /**
@@ -1,7 +1,7 @@
1
- export declare class IconCache {
1
+ export declare class CacheStorageIconCache {
2
2
  private cache;
3
3
  private promises;
4
- constructor();
4
+ constructor(cache: Promise<Cache>);
5
5
  /**
6
6
  * Get icon data from the cache
7
7
  * @param {string} name name of the icon
@@ -14,5 +14,3 @@ export declare class IconCache {
14
14
  private validSvg;
15
15
  private getUrl;
16
16
  }
17
- declare const _default: IconCache;
18
- export default _default;
@@ -0,0 +1,4 @@
1
+ import { CacheStorageIconCache } from './cache-storage-icon-cache';
2
+ import { InMemoryIconCache } from './in-memory-icon-cache';
3
+ declare const _default: CacheStorageIconCache | InMemoryIconCache;
4
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export declare class InMemoryIconCache {
2
+ private cache;
3
+ private resolveFunctions;
4
+ /**
5
+ * Get icon data from the cache
6
+ * @param {string} name name of the icon
7
+ * @param {string} path path on the server where the assets are located
8
+ * @returns {string} svg markup
9
+ */
10
+ get(name: any, path?: string): Promise<any>;
11
+ private getIcon;
12
+ private fetchData;
13
+ private validSvg;
14
+ private resolvePromises;
15
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Overrides the default browser behavior for clickable elements
3
+ * When focused and pressing down enter, avoids calling onClick repeatedly
4
+ * @param {HTMLElement} element the clickable element
5
+ */
6
+ export declare function makeEnterClickable(element: HTMLElement): void;
7
+ export declare function removeEnterClickable(element: HTMLElement): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.1.0-next.2",
3
+ "version": "37.1.0-next.21",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -40,16 +40,16 @@
40
40
  "generate": "stencil generate"
41
41
  },
42
42
  "devDependencies": {
43
- "@commitlint/config-conventional": "^17.6.6",
43
+ "@commitlint/config-conventional": "^17.7.0",
44
44
  "@popperjs/core": "^2.11.8",
45
45
  "@rjsf/core": "^2.4.2",
46
46
  "@stencil/core": "^3.4.1",
47
- "@stencil/sass": "^3.0.4",
47
+ "@stencil/sass": "^3.0.5",
48
48
  "@types/codemirror": "^5.60.2",
49
49
  "@types/html-escaper": "^3.0.0",
50
50
  "@types/jest": "^27.4.0",
51
- "@types/lodash-es": "^4.17.7",
52
- "@types/react": "^18.2.14",
51
+ "@types/lodash-es": "^4.17.9",
52
+ "@types/react": "^18.2.21",
53
53
  "@types/tabulator-tables": "^4.9.4",
54
54
  "@typescript-eslint/eslint-plugin": "^5.61.0",
55
55
  "@typescript-eslint/parser": "^5.62.0",
@@ -58,14 +58,14 @@
58
58
  "codemirror": "^5.65.9",
59
59
  "cross-env": "^7.0.3",
60
60
  "dayjs": "^1.11.9",
61
- "eslint": "^8.44.0",
62
- "eslint-config-prettier": "^8.8.0",
61
+ "eslint": "^8.48.0",
62
+ "eslint-config-prettier": "^9.0.0",
63
63
  "eslint-plugin-ban": "^1.6.0",
64
- "eslint-plugin-jsdoc": "^46.4.3",
64
+ "eslint-plugin-jsdoc": "^46.5.1",
65
65
  "eslint-plugin-prefer-arrow": "^1.2.3",
66
66
  "eslint-plugin-prettier": "^4.2.1",
67
- "eslint-plugin-react": "^7.32.2",
68
- "eslint-plugin-sonarjs": "^0.19.0",
67
+ "eslint-plugin-react": "^7.33.2",
68
+ "eslint-plugin-sonarjs": "^0.21.0",
69
69
  "flatpickr": "^4.6.13",
70
70
  "html-escaper": "^3.0.3",
71
71
  "jest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UAClD,yBAAyB,EAAE,KAAK,CAAC,QAAQ;SAC5C,EACD,OAAO,EAAE,KAAK,CAAC,EAAE,IAEhB,KAAK,CAAC,KAAK,CACR,CACN;IACNA,QAAC,UAAU,IAAC,IAAI,EAAE,KAAK,CAAC,UAAU,GAAI;GACzC,CAAC;AACN,EAAE;AAEF,MAAM,UAAU,GAA0C,CAAC,KAAK;EAC5D,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;IAChC,OAAO;GACV;EAED,OAAOA,+BAAmB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,GAAI,CAAC;AAChE,CAAC;;;;","names":["h"],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n }\n\n return [\n <div class=\"mdc-form-field \">\n <div\n class={{\n 'mdc-checkbox': true,\n 'mdc-checkbox--invalid': props.invalid,\n 'mdc-checkbox--disabled': props.disabled,\n 'mdc-checkbox--required': props.required,\n 'mdc-checkbox--indeterminate': props.indeterminate,\n 'lime-checkbox--readonly': props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n class=\"mdc-checkbox__native-control\"\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n {...inputProps}\n />\n <div class=\"mdc-checkbox__background\">\n <svg class=\"mdc-checkbox__checkmark\" viewBox=\"0 0 24 24\">\n <path\n class=\"mdc-checkbox__checkmark-path\"\n fill=\"none\"\n d=\"M1.73,12.91 8.1,19.28 22.79,4.59\"\n />\n </svg>\n <div class=\"mdc-checkbox__mixedmark\" />\n </div>\n </div>\n <label\n class={{\n 'mdc-checkbox--invalid': props.invalid,\n 'mdc-checkbox--disabled': props.disabled,\n 'mdc-checkbox--required': props.required,\n 'mdc-checkbox--indeterminate': props.indeterminate,\n 'lime-checkbox--readonly': props.readonly,\n }}\n htmlFor={props.id}\n >\n {props.label}\n </label>\n </div>,\n <HelperText text={props.helperText} />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{ text: string }> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return <limel-helper-line helperText={props.text.trim()} />;\n};\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-cache.js","sourceRoot":"","sources":["../../src/global/icon-cache.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,+BAA+B,CAAC;AAEnD,MAAM,OAAO,SAAS;EAQlB;IAFQ,aAAQ,GAAkC,EAAE,CAAC;IAGjD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EACzC,CAAC;EAED;;;;;KAKG;EACI,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE;IAC5C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC;IAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAEpC,IAAI,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,CAAC,QAAQ,EAAE;MACX,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAC/C;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;EAClC,CAAC;EAEO,KAAK,CAAC,SAAS,CAAC,GAAW,EAAE,KAAY;IAC7C,IAAI,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,G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AAC,GAAG,EAAE;EACjB,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC,EAAE,CAAC","sourcesContent":["const CACHE_NAME = '@limetech/lime-elements/icons';\n\nexport class IconCache {\n /*\n * Cache of all loaded SVGs\n */\n private cache: Promise<Cache>;\n\n private promises: Record<string, Promise<void>> = {};\n\n constructor() {\n this.cache = caches.open(CACHE_NAME);\n }\n\n /**\n * Get icon data from the cache\n * @param {string} name name of the icon\n * @param {string} path path on the server where the assets are located\n * @returns {Promise<string>} svg markup\n */\n public async get(name: string, path: string = ''): Promise<string> {\n const cache = await this.cache;\n const url = this.getUrl(name, path);\n\n let response = await cache.match(url);\n if (!response) {\n response = await this.fetchData(url, cache);\n }\n\n return this.getIcon(response);\n }\n\n private async fetchData(url: string, cache: Cache): Promise<Response> {\n let requestPromise = this.promises[url];\n if (requestPromise === undefined) {\n requestPromise = cache.add(url);\n this.promises[url] = requestPromise;\n }\n\n await requestPromise;\n\n return cache.match(url);\n }\n\n /*\n * Get icon data from a response\n */\n private async getIcon(response: Response): Promise<string> {\n let svgData = await response.text();\n\n // Some of the icons in the Icons8 library have hard coded black color on some of the paths.\n // In order to apply coloring with CSS, these have to be set to 'currentColor'\n svgData = svgData.replace(/#000000/g, 'currentColor');\n\n if (!this.validSvg(svgData)) {\n throw new Error('Invalid SVG');\n }\n\n return svgData;\n }\n\n /*\n * Check if the given data is a valid SVG document\n */\n private validSvg(data) {\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(data, 'image/svg+xml');\n\n return svgDoc.documentElement.tagName.toLowerCase() === 'svg';\n }\n\n private getUrl(name: string, path: string): string {\n let iconPath = path || '';\n if (path && !path.endsWith('/')) {\n iconPath = `${path}/`;\n }\n\n return `${iconPath}assets/icons/${name}.svg`;\n }\n}\n\nconst iconCache = new IconCache();\nexport default (() => {\n return iconCache;\n})();\n"]}
@@ -1,51 +0,0 @@
1
- import { forceUpdate } from '@stencil/core';
2
- const eventHandlers = new WeakMap();
3
- export function makeEnterClickable(element) {
4
- if (eventHandlers.has(element)) {
5
- return;
6
- }
7
- let isActive = false;
8
- let hasJustReleasedEnter = true;
9
- const keydownHandler = (event) => {
10
- if (event.key === 'Enter' && !isActive) {
11
- isActive = true;
12
- forceUpdate(element);
13
- }
14
- };
15
- const keyupHandler = (event) => {
16
- if (event.key === 'Enter' && isActive) {
17
- isActive = false;
18
- hasJustReleasedEnter = true;
19
- forceUpdate(element);
20
- }
21
- };
22
- const clickHandler = (event) => {
23
- if (!isActive) {
24
- return;
25
- }
26
- if (hasJustReleasedEnter) {
27
- hasJustReleasedEnter = false;
28
- return;
29
- }
30
- event.stopImmediatePropagation();
31
- };
32
- eventHandlers.set(element, {
33
- keydownHandler: keydownHandler,
34
- keyupHandler: keyupHandler,
35
- clickHandler: clickHandler,
36
- });
37
- element.addEventListener('keydown', keydownHandler);
38
- element.addEventListener('keyup', keyupHandler);
39
- element.addEventListener('click', clickHandler, true);
40
- }
41
- export function removeEnterClickable(element) {
42
- const callBacks = eventHandlers.get(element);
43
- if (!callBacks || !eventHandlers.has(element)) {
44
- return;
45
- }
46
- element.removeEventListener('keydown', callBacks.keydownHandler);
47
- element.removeEventListener('keyup', callBacks.keyupHandler);
48
- element.removeEventListener('click', callBacks.clickHandler, true);
49
- eventHandlers.delete(element);
50
- }
51
- //# sourceMappingURL=makeEnterClickable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"makeEnterClickable.js","sourceRoot":"","sources":["../../src/util/makeEnterClickable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,aAAa,GAAoC,IAAI,OAAO,EAAE,CAAC;AAErE,MAAM,UAAU,kBAAkB,CAAC,OAAoB;EACnD,IAAI,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;IAC5B,OAAO;GACV;EAED,IAAI,QAAQ,GAAG,KAAK,CAAC;EACrB,IAAI,oBAAoB,GAAG,IAAI,CAAC;EAEhC,MAAM,cA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,CAAC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;EACjE,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;EAC7D,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;EAEnE,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import { forceUpdate } from '@stencil/core';\n\nconst eventHandlers: WeakMap<HTMLElement, CallBacks> = new WeakMap();\n\nexport function makeEnterClickable(element: HTMLElement) {\n if (eventHandlers.has(element)) {\n return;\n }\n\n let isActive = false;\n let hasJustReleasedEnter = true;\n\n const keydownHandler = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && !isActive) {\n isActive = true;\n\n forceUpdate(element);\n }\n };\n\n const keyupHandler = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && isActive) {\n isActive = false;\n hasJustReleasedEnter = true;\n\n forceUpdate(element);\n }\n };\n\n const clickHandler = (event: MouseEvent) => {\n if (!isActive) {\n return;\n }\n\n if (hasJustReleasedEnter) {\n hasJustReleasedEnter = false;\n\n return;\n }\n\n event.stopImmediatePropagation();\n };\n\n eventHandlers.set(element, {\n keydownHandler: keydownHandler,\n keyupHandler: keyupHandler,\n clickHandler: clickHandler,\n });\n\n element.addEventListener('keydown', keydownHandler);\n element.addEventListener('keyup', keyupHandler);\n element.addEventListener('click', clickHandler, true);\n}\n\nexport function removeEnterClickable(element: HTMLElement) {\n const callBacks: CallBacks = eventHandlers.get(element);\n\n if (!callBacks || !eventHandlers.has(element)) {\n return;\n }\n\n element.removeEventListener('keydown', callBacks.keydownHandler);\n element.removeEventListener('keyup', callBacks.keyupHandler);\n element.removeEventListener('click', callBacks.clickHandler, true);\n\n eventHandlers.delete(element);\n}\n\ninterface CallBacks {\n keydownHandler: (arg: KeyboardEvent) => void;\n keyupHandler: (arg: KeyboardEvent) => void;\n clickHand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AClD,yBAAyB,EAAE,KAAK,CAAC,QAAQ;SAC5C,EACD,OAAO,EAAE,KAAK,CAAC,EAAE,IAEhB,KAAK,CAAC,KAAK,CACR,CACN;IACN,EAAC,UAAU,IAAC,IAAI,EAAE,KAAK,CAAC,UAAU,GAAI;GACzC,CAAC;AACN,EAAE;AAEF,MAAM,UAAU,GAA0C,CAAC,KAAK;EAC5D,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;IAChC,OAAO;GACV;EAED,OAAO,yBAAmB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,GAAI,CAAC;AAChE,CAAC;;;;","names":[],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n }\n\n return [\n <div class=\"mdc-form-field \">\n <div\n class={{\n 'mdc-checkbox': true,\n 'mdc-checkbox--invalid': props.invalid,\n 'mdc-checkbox--disabled': props.disabled,\n 'mdc-checkbox--required': props.required,\n 'mdc-checkbox--indeterminate': props.indeterminate,\n 'lime-checkbox--readonly': props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n class=\"mdc-checkbox__native-control\"\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n {...inputProps}\n />\n <div class=\"mdc-checkbox__background\">\n <svg class=\"mdc-checkbox__checkmark\" viewBox=\"0 0 24 24\">\n <path\n class=\"mdc-checkbox__checkmark-path\"\n fill=\"none\"\n d=\"M1.73,12.91 8.1,19.28 22.79,4.59\"\n />\n </svg>\n <div class=\"mdc-checkbox__mixedmark\" />\n </div>\n </div>\n <label\n class={{\n 'mdc-checkbox--invalid': props.invalid,\n 'mdc-checkbox--disabled': props.disabled,\n 'mdc-checkbox--required': props.required,\n 'mdc-checkbox--indeterminate': props.indeterminate,\n 'lime-checkbox--readonly': props.readonly,\n }}\n htmlFor={props.id}\n >\n {props.label}\n </label>\n </div>,\n <HelperText text={props.helperText} />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{ text: string }> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return <limel-helper-line helperText={props.text.trim()} />;\n};\n"],"version":3}