@sme.up/ketchup 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/cjs/{cell-utils-1f89a299.js → cell-utils-841a7769.js} +2 -2
  2. package/dist/cjs/{f-chip-2d58c8f7.js → f-chip-b9f489ff.js} +7 -5
  3. package/dist/cjs/{f-image-5f4f29ca.js → f-image-0c3e6aa7.js} +3 -4
  4. package/dist/cjs/{index-3c471303.js → index-0416afab.js} +73 -64
  5. package/dist/cjs/ketchup.cjs.js +3 -3
  6. package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
  7. package/dist/cjs/kup-autocomplete_29.cjs.entry.js +1014 -1103
  8. package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
  9. package/dist/cjs/kup-dash-list.cjs.entry.js +6 -6
  10. package/dist/cjs/kup-dash_2.cjs.entry.js +106 -62
  11. package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-field.cjs.entry.js +3 -3
  13. package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
  14. package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-magic-box.cjs.entry.js +21 -30
  16. package/dist/cjs/{kup-manager-59ad8bdc.js → kup-manager-828bd598.js} +599 -519
  17. package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -4
  18. package/dist/cjs/{kup-objects-59ea949c.js → kup-objects-89f38d6a.js} +7 -29
  19. package/dist/cjs/kup-probe.cjs.entry.js +3 -3
  20. package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
  21. package/dist/cjs/loader.cjs.js +3 -3
  22. package/dist/cjs/{utils-2af73538.js → utils-5192ee20.js} +1 -1
  23. package/dist/collection/assets/data-table.js +1 -0
  24. package/dist/collection/collection-manifest.json +2 -3
  25. package/dist/collection/components/kup-accordion/kup-accordion.js +14 -14
  26. package/dist/collection/components/kup-autocomplete/kup-autocomplete.css +9 -0
  27. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +20 -23
  28. package/dist/collection/components/kup-badge/kup-badge.js +12 -12
  29. package/dist/collection/components/kup-box/kup-box.css +30 -30
  30. package/dist/collection/components/kup-box/kup-box.js +181 -171
  31. package/dist/collection/components/kup-button/kup-button.css +8 -5
  32. package/dist/collection/components/kup-button/kup-button.js +26 -26
  33. package/dist/collection/components/kup-button-list/kup-button-list.css +8 -5
  34. package/dist/collection/components/kup-button-list/kup-button-list.js +18 -18
  35. package/dist/collection/components/kup-calendar/kup-calendar.css +8 -6
  36. package/dist/collection/components/kup-calendar/kup-calendar.js +30 -30
  37. package/dist/collection/components/kup-card/kup-card-helper.js +2 -1
  38. package/dist/collection/components/kup-card/kup-card.css +20 -1
  39. package/dist/collection/components/kup-card/kup-card.js +26 -26
  40. package/dist/collection/components/kup-chart/kup-chart.js +40 -40
  41. package/dist/collection/components/kup-checkbox/kup-checkbox.js +18 -18
  42. package/dist/collection/components/kup-chip/kup-chip.css +0 -1
  43. package/dist/collection/components/kup-chip/kup-chip.js +14 -14
  44. package/dist/collection/components/kup-color-picker/kup-color-picker.css +6 -9
  45. package/dist/collection/components/kup-color-picker/kup-color-picker.js +32 -40
  46. package/dist/collection/components/kup-combobox/kup-combobox.css +9 -0
  47. package/dist/collection/components/kup-combobox/kup-combobox.js +20 -23
  48. package/dist/collection/components/kup-dash-list/kup-dash-list.js +2 -2
  49. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -0
  50. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +25 -46
  51. package/dist/collection/components/kup-data-table/kup-data-table.css +83 -87
  52. package/dist/collection/components/kup-data-table/kup-data-table.js +364 -531
  53. package/dist/collection/components/kup-date-picker/kup-date-picker.css +2373 -5
  54. package/dist/collection/components/kup-date-picker/kup-date-picker.js +72 -104
  55. package/dist/collection/components/kup-drawer/kup-drawer.js +8 -8
  56. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +13 -5
  57. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +38 -43
  58. package/dist/collection/components/kup-field/kup-field.js +20 -20
  59. package/dist/collection/components/kup-gauge/kup-gauge.js +16 -16
  60. package/dist/collection/components/kup-grid/kup-grid.css +2 -1
  61. package/dist/collection/components/kup-grid/kup-grid.js +12 -12
  62. package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
  63. package/dist/collection/components/kup-image/kup-image.js +24 -24
  64. package/dist/collection/components/kup-lazy/kup-lazy.js +16 -16
  65. package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
  66. package/dist/collection/components/kup-list/kup-list.css +4 -0
  67. package/dist/collection/components/kup-list/kup-list.js +38 -47
  68. package/dist/collection/components/kup-magic-box/kup-magic-box.css +11 -6
  69. package/dist/collection/components/kup-magic-box/kup-magic-box.js +27 -36
  70. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +10 -10
  71. package/dist/collection/components/kup-paginator/kup-paginator.css +8 -5
  72. package/dist/collection/components/kup-probe/kup-probe.js +8 -8
  73. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +20 -20
  74. package/dist/collection/components/kup-radio/kup-radio.js +16 -16
  75. package/dist/collection/components/kup-rating/kup-rating.js +14 -14
  76. package/dist/collection/components/kup-spinner/kup-spinner.js +22 -22
  77. package/dist/collection/components/kup-switch/kup-switch.js +16 -16
  78. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +12 -12
  79. package/dist/collection/components/kup-text-field/kup-text-field.js +48 -48
  80. package/dist/collection/components/kup-time-picker/kup-time-picker.css +2376 -0
  81. package/dist/collection/components/kup-time-picker/kup-time-picker.js +50 -83
  82. package/dist/collection/components/kup-tooltip/kup-tooltip.js +18 -12
  83. package/dist/collection/components/kup-tree/kup-tree.css +10 -10
  84. package/dist/collection/components/kup-tree/kup-tree.js +96 -66
  85. package/dist/collection/f-components/f-button/f-button.js +4 -2
  86. package/dist/collection/f-components/f-image/f-image.js +1 -2
  87. package/dist/collection/f-components/f-text-field/f-text-field.js +8 -6
  88. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +11 -3
  89. package/dist/collection/utils/kup-debug/kup-debug.js +25 -27
  90. package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +3 -5
  91. package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
  92. package/dist/collection/utils/kup-interact/kup-interact.js +362 -0
  93. package/dist/collection/utils/kup-manager/kup-manager.js +18 -6
  94. package/dist/collection/utils/kup-objects/kup-objects.js +7 -29
  95. package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
  96. package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
  97. package/dist/esm/{cell-utils-cb612463.js → cell-utils-de384721.js} +2 -2
  98. package/dist/esm/{f-chip-125d5dd6.js → f-chip-d585b63e.js} +7 -5
  99. package/dist/esm/{f-image-68b34fab.js → f-image-23548d00.js} +3 -4
  100. package/dist/esm/{index-bf2824a6.js → index-51694018.js} +73 -64
  101. package/dist/esm/ketchup.js +3 -3
  102. package/dist/esm/kup-accordion.entry.js +5 -5
  103. package/dist/esm/kup-autocomplete_29.entry.js +818 -907
  104. package/dist/esm/kup-calendar.entry.js +8 -8
  105. package/dist/esm/kup-dash-list.entry.js +6 -6
  106. package/dist/esm/kup-dash_2.entry.js +106 -62
  107. package/dist/esm/kup-drawer.entry.js +4 -4
  108. package/dist/esm/kup-field.entry.js +3 -3
  109. package/dist/esm/kup-iframe.entry.js +4 -4
  110. package/dist/esm/kup-lazy.entry.js +4 -4
  111. package/dist/esm/kup-magic-box.entry.js +21 -30
  112. package/dist/esm/{kup-manager-e7d7b353.js → kup-manager-583f2815.js} +595 -520
  113. package/dist/esm/kup-nav-bar.entry.js +4 -4
  114. package/dist/esm/{kup-objects-d38d2fa2.js → kup-objects-5968aefd.js} +7 -29
  115. package/dist/esm/kup-probe.entry.js +3 -3
  116. package/dist/esm/kup-qlik.entry.js +3 -3
  117. package/dist/esm/loader.js +3 -3
  118. package/dist/esm/{utils-13dd007a.js → utils-a1dd14c3.js} +1 -1
  119. package/dist/ketchup/ketchup.esm.js +1 -1
  120. package/dist/ketchup/{p-64ea7e37.entry.js → p-0e91c9c9.entry.js} +1 -1
  121. package/dist/ketchup/{p-0320e24e.entry.js → p-0f2b6a24.entry.js} +1 -1
  122. package/dist/ketchup/{p-a5424073.js → p-361d9431.js} +1 -1
  123. package/dist/ketchup/p-565785ce.js +1 -0
  124. package/dist/ketchup/{p-7896031c.entry.js → p-57eb45ac.entry.js} +1 -1
  125. package/dist/ketchup/{p-08c7a092.js → p-6f5d8830.js} +1 -1
  126. package/dist/ketchup/{p-9c858a38.entry.js → p-802d8906.entry.js} +1 -1
  127. package/dist/ketchup/p-850b9e67.entry.js +1 -0
  128. package/dist/ketchup/{p-a12a5690.entry.js → p-88a5787a.entry.js} +1 -1
  129. package/dist/ketchup/p-8ed2b7bf.entry.js +1 -0
  130. package/dist/ketchup/{p-ee89966f.entry.js → p-90a0c2b7.entry.js} +2 -2
  131. package/dist/ketchup/{p-876da4c2.entry.js → p-94c0dd8c.entry.js} +1 -1
  132. package/dist/ketchup/p-9ec3c377.entry.js +45 -0
  133. package/dist/ketchup/p-b30f34d8.js +1 -0
  134. package/dist/ketchup/p-b6a47512.entry.js +1 -0
  135. package/dist/ketchup/p-bfaf8a82.js +1 -0
  136. package/dist/ketchup/{p-940ab57a.entry.js → p-ca0ebdcc.entry.js} +1 -1
  137. package/dist/ketchup/p-d5a3a4ed.js +1 -0
  138. package/dist/ketchup/{p-c7ee1fbc.js → p-ee7b190c.js} +1 -1
  139. package/dist/ketchup/{p-b0724035.entry.js → p-f6b54fa1.entry.js} +1 -1
  140. package/dist/types/components/kup-box/kup-box-declarations.d.ts +11 -2
  141. package/dist/types/components/kup-box/kup-box.d.ts +8 -4
  142. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +0 -1
  143. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +12 -4
  144. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +0 -2
  145. package/dist/types/components/kup-data-table/kup-data-table.d.ts +16 -49
  146. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +11 -14
  147. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +0 -4
  148. package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
  149. package/dist/types/components/kup-list/kup-list.d.ts +2 -3
  150. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
  151. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +7 -11
  152. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
  153. package/dist/types/components/kup-tree/kup-tree.d.ts +3 -0
  154. package/dist/types/components.d.ts +84 -121
  155. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
  156. package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
  157. package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
  158. package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +21 -4
  159. package/dist/types/utils/kup-manager/kup-manager.d.ts +2 -2
  160. package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
  161. package/package.json +3 -3
  162. package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
  163. package/dist/cjs/kup-grid.cjs.entry.js +0 -130
  164. package/dist/collection/assets/images/drag-multiple.js +0 -1
  165. package/dist/collection/components/kup-layout/kup-layout.css +0 -53
  166. package/dist/collection/components/kup-layout/kup-layout.js +0 -156
  167. package/dist/collection/utils/drag-and-drop.js +0 -109
  168. package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
  169. package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
  170. package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
  171. package/dist/esm/kup-grid.entry.js +0 -126
  172. package/dist/ketchup/p-00fe1e3e.js +0 -1
  173. package/dist/ketchup/p-1165f4ea.entry.js +0 -1
  174. package/dist/ketchup/p-170d3cba.js +0 -1
  175. package/dist/ketchup/p-18cb3ba3.js +0 -1
  176. package/dist/ketchup/p-23541a97.entry.js +0 -45
  177. package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
  178. package/dist/ketchup/p-b14e77f0.js +0 -1
  179. package/dist/ketchup/p-d24cfdea.entry.js +0 -1
  180. package/dist/ketchup/p-fcd2fd8f.js +0 -1
  181. package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
  182. package/dist/types/assets/images/drag-multiple.d.ts +0 -1
  183. package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
  184. package/dist/types/utils/drag-and-drop.d.ts +0 -53
  185. package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
  186. package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
@@ -208,8 +208,8 @@ export class KupLazy {
208
208
  "optional": false,
209
209
  "docs": {
210
210
  "tags": [{
211
- "text": "null",
212
- "name": "default"
211
+ "name": "default",
212
+ "text": "null"
213
213
  }],
214
214
  "text": "Sets the tag name of the component to be lazy loaded."
215
215
  },
@@ -229,11 +229,11 @@ export class KupLazy {
229
229
  "optional": false,
230
230
  "docs": {
231
231
  "tags": [{
232
- "text": "\"\"",
233
- "name": "default"
232
+ "name": "default",
233
+ "text": "\"\""
234
234
  }, {
235
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
236
- "name": "see"
235
+ "name": "see",
236
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
237
237
  }],
238
238
  "text": "Custom style of the component."
239
239
  },
@@ -258,8 +258,8 @@ export class KupLazy {
258
258
  "optional": false,
259
259
  "docs": {
260
260
  "tags": [{
261
- "text": "null",
262
- "name": "default"
261
+ "name": "default",
262
+ "text": "null"
263
263
  }],
264
264
  "text": "Sets the data of the component to be lazy loaded."
265
265
  },
@@ -282,8 +282,8 @@ export class KupLazy {
282
282
  "optional": false,
283
283
  "docs": {
284
284
  "tags": [{
285
- "text": "KupLazyRender.BOTH",
286
- "name": "default"
285
+ "name": "default",
286
+ "text": "KupLazyRender.BOTH"
287
287
  }],
288
288
  "text": "Decides when the sub-component should be rendered.\nBy default when both the component props exist and the component is in the viewport."
289
289
  },
@@ -303,8 +303,8 @@ export class KupLazy {
303
303
  "optional": false,
304
304
  "docs": {
305
305
  "tags": [{
306
- "text": "true",
307
- "name": "default"
306
+ "name": "default",
307
+ "text": "true"
308
308
  }],
309
309
  "text": "Displays an animated SVG placeholder until the component is loaded."
310
310
  },
@@ -322,8 +322,8 @@ export class KupLazy {
322
322
  "signature": "(descriptions?: boolean) => Promise<GenericObject>",
323
323
  "parameters": [{
324
324
  "tags": [{
325
- "text": "descriptions - When provided and true, the result will be the list of props with their description.",
326
- "name": "param"
325
+ "name": "param",
326
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
327
327
  }],
328
328
  "text": "- When provided and true, the result will be the list of props with their description."
329
329
  }],
@@ -370,8 +370,8 @@ export class KupLazy {
370
370
  "signature": "(props: GenericObject) => Promise<void>",
371
371
  "parameters": [{
372
372
  "tags": [{
373
- "text": "props - Object containing props that will be set to the component.",
374
- "name": "param"
373
+ "name": "param",
374
+ "text": "props - Object containing props that will be set to the component."
375
375
  }],
376
376
  "text": "- Object containing props that will be set to the component."
377
377
  }],
@@ -10,7 +10,7 @@ export var KupListProps;
10
10
  KupListProps["filter"] = "Keeps string for filtering elements when filter mode is active";
11
11
  KupListProps["hideText"] = "Hides rows' text, ideally to display a list of icons only.";
12
12
  KupListProps["isMenu"] = "Defines whether the list is a menu or not.";
13
- KupListProps["keyboardNavigation"] = "When true, enables items' navigation through keys. Defaults to false when the component's isMenu prop is set to true.";
13
+ KupListProps["keyboardNavigation"] = "When true, enables items' navigation through arrow keys.";
14
14
  KupListProps["menuVisible"] = "Sets the status of the menu, when false it's hidden otherwise it's visible.";
15
15
  KupListProps["roleType"] = "Defines the type of selection. Values accepted: listbox, radiogroup or group.";
16
16
  KupListProps["selectable"] = "Defines whether items are selectable or not.";
@@ -419,11 +419,15 @@
419
419
  transform: none;
420
420
  transform-origin: unset;
421
421
  transition: height 0.2s;
422
+ user-select: none;
422
423
  will-change: unset;
423
424
  }
424
425
  .kup-menu.visible {
425
426
  display: block;
426
427
  }
428
+ .kup-menu .list-item__text {
429
+ user-select: none;
430
+ }
427
431
 
428
432
  @keyframes fade-in {
429
433
  0% {
@@ -57,11 +57,10 @@ export class KupList {
57
57
  */
58
58
  this.isMenu = false;
59
59
  /**
60
- * When true, enables items' navigation through keys.
61
- * Defaults to false when the component's isMenu prop is set to true.
62
- * @default undefined
60
+ * When true, enables items' navigation through arrow keys.
61
+ * @default true
63
62
  */
64
- this.keyboardNavigation = undefined;
63
+ this.keyboardNavigation = true;
65
64
  /**
66
65
  * Sets the status of the menu, when false it's hidden otherwise it's visible.
67
66
  * @default false
@@ -457,14 +456,6 @@ export class KupList {
457
456
  componentWillLoad() {
458
457
  this.kupManager.debug.logLoad(this, false);
459
458
  this.kupManager.theme.register(this);
460
- if (this.keyboardNavigation === undefined) {
461
- if (this.isMenu) {
462
- this.keyboardNavigation = false;
463
- }
464
- else {
465
- this.keyboardNavigation = true;
466
- }
467
- }
468
459
  for (let index = 0; index < this.data.length; index++) {
469
460
  const el = this.data[index];
470
461
  if (el.selected) {
@@ -549,11 +540,11 @@ export class KupList {
549
540
  "optional": false,
550
541
  "docs": {
551
542
  "tags": [{
552
- "text": "\"\"",
553
- "name": "default"
543
+ "name": "default",
544
+ "text": "\"\""
554
545
  }, {
555
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
556
- "name": "see"
546
+ "name": "see",
547
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
557
548
  }],
558
549
  "text": "Custom style of the component."
559
550
  },
@@ -578,8 +569,8 @@ export class KupList {
578
569
  "optional": false,
579
570
  "docs": {
580
571
  "tags": [{
581
- "text": "[]",
582
- "name": "default"
572
+ "name": "default",
573
+ "text": "[]"
583
574
  }],
584
575
  "text": "The data of the list."
585
576
  },
@@ -602,8 +593,8 @@ export class KupList {
602
593
  "optional": false,
603
594
  "docs": {
604
595
  "tags": [{
605
- "text": "ItemsDisplayMode.DESCRIPTION",
606
- "name": "default"
596
+ "name": "default",
597
+ "text": "ItemsDisplayMode.DESCRIPTION"
607
598
  }],
608
599
  "text": "Selects how the items must display their label and how they can be filtered for."
609
600
  },
@@ -623,8 +614,8 @@ export class KupList {
623
614
  "optional": false,
624
615
  "docs": {
625
616
  "tags": [{
626
- "text": "''",
627
- "name": "default"
617
+ "name": "default",
618
+ "text": "''"
628
619
  }],
629
620
  "text": "Keeps string for filtering elements when filter mode is active"
630
621
  },
@@ -644,8 +635,8 @@ export class KupList {
644
635
  "optional": false,
645
636
  "docs": {
646
637
  "tags": [{
647
- "text": "false",
648
- "name": "default"
638
+ "name": "default",
639
+ "text": "false"
649
640
  }],
650
641
  "text": "Hides rows' text, ideally to display a list of icons only."
651
642
  },
@@ -665,8 +656,8 @@ export class KupList {
665
656
  "optional": false,
666
657
  "docs": {
667
658
  "tags": [{
668
- "text": "false",
669
- "name": "default"
659
+ "name": "default",
660
+ "text": "false"
670
661
  }],
671
662
  "text": "Defines whether the list is a menu or not."
672
663
  },
@@ -676,7 +667,7 @@ export class KupList {
676
667
  },
677
668
  "keyboardNavigation": {
678
669
  "type": "boolean",
679
- "mutable": true,
670
+ "mutable": false,
680
671
  "complexType": {
681
672
  "original": "boolean",
682
673
  "resolved": "boolean",
@@ -686,14 +677,14 @@ export class KupList {
686
677
  "optional": false,
687
678
  "docs": {
688
679
  "tags": [{
689
- "text": "undefined",
690
- "name": "default"
680
+ "name": "default",
681
+ "text": "true"
691
682
  }],
692
- "text": "When true, enables items' navigation through keys.\nDefaults to false when the component's isMenu prop is set to true."
683
+ "text": "When true, enables items' navigation through arrow keys."
693
684
  },
694
685
  "attribute": "keyboard-navigation",
695
686
  "reflect": false,
696
- "defaultValue": "undefined"
687
+ "defaultValue": "true"
697
688
  },
698
689
  "menuVisible": {
699
690
  "type": "boolean",
@@ -707,8 +698,8 @@ export class KupList {
707
698
  "optional": false,
708
699
  "docs": {
709
700
  "tags": [{
710
- "text": "false",
711
- "name": "default"
701
+ "name": "default",
702
+ "text": "false"
712
703
  }],
713
704
  "text": "Sets the status of the menu, when false it's hidden otherwise it's visible."
714
705
  },
@@ -733,8 +724,8 @@ export class KupList {
733
724
  "optional": true,
734
725
  "docs": {
735
726
  "tags": [{
736
- "text": "KupListRole.LISTBOX",
737
- "name": "default"
727
+ "name": "default",
728
+ "text": "KupListRole.LISTBOX"
738
729
  }],
739
730
  "text": "Defines the type of selection. Values accepted: listbox, radiogroup or group."
740
731
  },
@@ -754,8 +745,8 @@ export class KupList {
754
745
  "optional": false,
755
746
  "docs": {
756
747
  "tags": [{
757
- "text": "true",
758
- "name": "default"
748
+ "name": "default",
749
+ "text": "true"
759
750
  }],
760
751
  "text": "Defines whether items are selectable or not."
761
752
  },
@@ -775,8 +766,8 @@ export class KupList {
775
766
  "optional": false,
776
767
  "docs": {
777
768
  "tags": [{
778
- "text": "false",
779
- "name": "default"
769
+ "name": "default",
770
+ "text": "false"
780
771
  }],
781
772
  "text": "Displays the icons associated to each row when set to true."
782
773
  },
@@ -796,8 +787,8 @@ export class KupList {
796
787
  "optional": false,
797
788
  "docs": {
798
789
  "tags": [{
799
- "text": "false",
800
- "name": "default"
790
+ "name": "default",
791
+ "text": "false"
801
792
  }],
802
793
  "text": "The list elements descriptions will be arranged in two lines."
803
794
  },
@@ -917,8 +908,8 @@ export class KupList {
917
908
  "signature": "(descriptions?: boolean) => Promise<GenericObject>",
918
909
  "parameters": [{
919
910
  "tags": [{
920
- "text": "descriptions - When provided and true, the result will be the list of props with their description.",
921
- "name": "param"
911
+ "name": "param",
912
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
922
913
  }],
923
914
  "text": "- When provided and true, the result will be the list of props with their description."
924
915
  }],
@@ -987,8 +978,8 @@ export class KupList {
987
978
  "signature": "(index?: number) => Promise<void>",
988
979
  "parameters": [{
989
980
  "tags": [{
990
- "text": "index - Based zero index of the item that must be selected, when not provided the list will attempt to select the focused element.",
991
- "name": "param"
981
+ "name": "param",
982
+ "text": "index - Based zero index of the item that must be selected, when not provided the list will attempt to select the focused element."
992
983
  }],
993
984
  "text": "- Based zero index of the item that must be selected, when not provided the list will attempt to select the focused element."
994
985
  }],
@@ -1012,8 +1003,8 @@ export class KupList {
1012
1003
  "signature": "(props: GenericObject) => Promise<void>",
1013
1004
  "parameters": [{
1014
1005
  "tags": [{
1015
- "text": "props - Object containing props that will be set to the component.",
1016
- "name": "param"
1006
+ "name": "param",
1007
+ "text": "props - Object containing props that will be set to the component."
1017
1008
  }],
1018
1009
  "text": "- Object containing props that will be set to the component."
1019
1010
  }],
@@ -36,15 +36,15 @@
36
36
  display: block;
37
37
  height: 300px;
38
38
  min-width: 700px;
39
- width: 700px;
40
39
  overflow: auto;
40
+ width: 700px;
41
41
  }
42
42
 
43
43
  #kup-component,
44
44
  .magic-box-wrapper {
45
45
  height: 100%;
46
- width: 100%;
47
46
  overflow: auto;
47
+ width: 100%;
48
48
  }
49
49
 
50
50
  .magic-box-wrapper {
@@ -56,11 +56,11 @@
56
56
 
57
57
  .actions {
58
58
  background-color: var(--kup-title-background-color);
59
- position: absolute;
60
- top: 0;
61
- left: 0;
62
59
  display: inline-flex;
63
60
  justify-content: center;
61
+ left: 0;
62
+ position: absolute;
63
+ top: 0;
64
64
  width: 100%;
65
65
  z-index: 1;
66
66
  }
@@ -81,7 +81,8 @@
81
81
  .content {
82
82
  box-sizing: border-box;
83
83
  height: 100%;
84
- padding-top: 52px;
84
+ margin-top: 52px;
85
+ transition: background-color 125ms ease;
85
86
  }
86
87
 
87
88
  .empty {
@@ -101,4 +102,8 @@
101
102
  .json {
102
103
  font-family: var(--kup-font-family-monospace);
103
104
  margin: 0;
105
+ }
106
+
107
+ [kup-drag-over] {
108
+ background-color: rgba(var(--kup-success-color-rgb), 0.25);
104
109
  }
@@ -1,7 +1,5 @@
1
1
  import { Component, Element, forceUpdate, h, Host, Method, Prop, State, } from '@stencil/core';
2
- import { setKetchupDroppable } from '../../utils/drag-and-drop';
3
2
  import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
4
- import { KupDataTableColumnDragType, KupDataTableRowDragType, } from '../kup-data-table/kup-data-table-declarations';
5
3
  import { FButtonStyling } from '../../f-components/f-button/f-button-declarations';
6
4
  import { FImage } from '../../f-components/f-image/f-image';
7
5
  import { KupMagicBoxProps, MagicBoxDisplay, } from './kup-magic-box-declarations';
@@ -10,6 +8,7 @@ import { KupLanguageGeneric } from '../../utils/kup-language/kup-language-declar
10
8
  import { KupThemeColorValues } from '../../utils/kup-theme/kup-theme-declarations';
11
9
  import { getProps, setProps } from '../../utils/utils';
12
10
  import { componentWrapperId } from '../../variables/GenericVariables';
11
+ import { kupDraggableColumnAttr, kupDraggableRowAttr, kupDropEvent, KupDropEventTypes, } from '../../utils/kup-interact/kup-interact-declarations';
13
12
  export class KupMagicBox {
14
13
  constructor() {
15
14
  /*-------------------------------------------------*/
@@ -45,6 +44,7 @@ export class KupMagicBox {
45
44
  * Element which enables the drag on move feature.
46
45
  */
47
46
  this.dragHandler = null;
47
+ this.wrapperRef = null;
48
48
  }
49
49
  /*-------------------------------------------------*/
50
50
  /* P u b l i c M e t h o d s */
@@ -215,10 +215,16 @@ export class KupMagicBox {
215
215
  this.kupManager.theme.register(this);
216
216
  }
217
217
  componentDidLoad() {
218
- this.rootElement.addEventListener('kup-drop', (e) => this.updateData(e));
218
+ this.rootElement.addEventListener(kupDropEvent, (e) => this.updateData(e));
219
219
  this.dragHandler =
220
220
  this.rootElement.shadowRoot.querySelector('#drag-handle');
221
- this.kupManager.dialog.register(this.rootElement, this.dragHandler);
221
+ this.kupManager.interact.dialogify(this.rootElement, this.dragHandler);
222
+ this.kupManager.interact.dropzone(this.wrapperRef, {
223
+ accept: `[${kupDraggableColumnAttr}],[${kupDraggableRowAttr}]`,
224
+ }, {
225
+ dispatcher: this.rootElement,
226
+ type: KupDropEventTypes.MAGICBOX,
227
+ });
222
228
  this.kupManager.debug.logLoad(this, true);
223
229
  }
224
230
  componentWillRender() {
@@ -228,29 +234,11 @@ export class KupMagicBox {
228
234
  this.kupManager.debug.logRender(this, true);
229
235
  }
230
236
  render() {
231
- const handlers = {
232
- // Had to define leave and over, otherwise drop wasn't working.
233
- onDragLeave: () => { },
234
- onDragOver: () => {
235
- return true;
236
- },
237
- onDrop: () => {
238
- return KupDataTableRowDragType;
239
- },
240
- };
241
237
  const customStyle = this.kupManager.theme.setCustomStyle(this.rootElement);
242
238
  return (h(Host, null,
243
239
  customStyle ? h("style", null, customStyle) : null,
244
240
  h("div", { id: componentWrapperId },
245
- h("div", Object.assign({ class: "magic-box-wrapper" }, setKetchupDroppable(handlers, [
246
- KupDataTableRowDragType,
247
- KupDataTableColumnDragType,
248
- ], this.rootElement, {
249
- row: null,
250
- cell: null,
251
- column: null,
252
- id: this.rootElement.id,
253
- })),
241
+ h("div", { class: "magic-box-wrapper" },
254
242
  h("div", { class: "actions", id: "drag-handle" },
255
243
  h("kup-combobox", Object.assign({}, this.comboboxProps())),
256
244
  h("kup-button", { styling: FButtonStyling.FLAT, icon: "delete", label: "Reset", "onkup-button-click": () => {
@@ -259,10 +247,13 @@ export class KupMagicBox {
259
247
  h("kup-button", { id: "close-dialog", customStyle: `:host{${KupThemeColorValues.PRIMARY}: var(${KupThemeColorValues.TITLE});}`, icon: "clear", "onkup-button-click": () => {
260
248
  this.kupManager.hideMagicBox();
261
249
  } })),
262
- h("div", { class: "content" }, this.setContent())))));
250
+ h("div", { class: "content", ref: (el) => (this.wrapperRef = el) }, this.setContent())))));
263
251
  }
264
252
  disconnectedCallback() {
265
- this.kupManager.dialog.unregister([this.rootElement]);
253
+ this.kupManager.interact.unregister([
254
+ this.rootElement,
255
+ this.wrapperRef,
256
+ ]);
266
257
  this.kupManager.language.unregister(this);
267
258
  this.kupManager.theme.unregister(this);
268
259
  }
@@ -287,11 +278,11 @@ export class KupMagicBox {
287
278
  "optional": false,
288
279
  "docs": {
289
280
  "tags": [{
290
- "text": "\"\"",
291
- "name": "default"
281
+ "name": "default",
282
+ "text": "\"\""
292
283
  }, {
293
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
294
- "name": "see"
284
+ "name": "see",
285
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
295
286
  }],
296
287
  "text": "Custom style of the component."
297
288
  },
@@ -301,7 +292,7 @@ export class KupMagicBox {
301
292
  },
302
293
  "data": {
303
294
  "type": "unknown",
304
- "mutable": false,
295
+ "mutable": true,
305
296
  "complexType": {
306
297
  "original": "MagicBoxData",
307
298
  "resolved": "MagicBoxData",
@@ -316,8 +307,8 @@ export class KupMagicBox {
316
307
  "optional": false,
317
308
  "docs": {
318
309
  "tags": [{
319
- "text": "null",
320
- "name": "default"
310
+ "name": "default",
311
+ "text": "null"
321
312
  }],
322
313
  "text": "Sets the data that will be used to display different components."
323
314
  },
@@ -333,8 +324,8 @@ export class KupMagicBox {
333
324
  "signature": "(descriptions?: boolean) => Promise<GenericObject>",
334
325
  "parameters": [{
335
326
  "tags": [{
336
- "text": "descriptions - When provided and true, the result will be the list of props with their description.",
337
- "name": "param"
327
+ "name": "param",
328
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
338
329
  }],
339
330
  "text": "- When provided and true, the result will be the list of props with their description."
340
331
  }],
@@ -381,8 +372,8 @@ export class KupMagicBox {
381
372
  "signature": "(props: GenericObject) => Promise<void>",
382
373
  "parameters": [{
383
374
  "tags": [{
384
- "text": "props - Object containing props that will be set to the component.",
385
- "name": "param"
375
+ "name": "param",
376
+ "text": "props - Object containing props that will be set to the component."
386
377
  }],
387
378
  "text": "- Object containing props that will be set to the component."
388
379
  }],
@@ -143,11 +143,11 @@ export class KupNavBar {
143
143
  "optional": false,
144
144
  "docs": {
145
145
  "tags": [{
146
- "text": "\"\"",
147
- "name": "default"
146
+ "name": "default",
147
+ "text": "\"\""
148
148
  }, {
149
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
150
- "name": "see"
149
+ "name": "see",
150
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
151
151
  }],
152
152
  "text": "Custom style of the component."
153
153
  },
@@ -172,8 +172,8 @@ export class KupNavBar {
172
172
  "optional": false,
173
173
  "docs": {
174
174
  "tags": [{
175
- "text": "KupNavBarStyling.STANDARD",
176
- "name": "default"
175
+ "name": "default",
176
+ "text": "KupNavBarStyling.STANDARD"
177
177
  }],
178
178
  "text": "Defines the style of the nav bar."
179
179
  },
@@ -229,8 +229,8 @@ export class KupNavBar {
229
229
  "signature": "(descriptions?: boolean) => Promise<GenericObject>",
230
230
  "parameters": [{
231
231
  "tags": [{
232
- "text": "descriptions - When provided and true, the result will be the list of props with their description.",
233
- "name": "param"
232
+ "name": "param",
233
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
234
234
  }],
235
235
  "text": "- When provided and true, the result will be the list of props with their description."
236
236
  }],
@@ -293,8 +293,8 @@ export class KupNavBar {
293
293
  "signature": "(props: GenericObject) => Promise<void>",
294
294
  "parameters": [{
295
295
  "tags": [{
296
- "text": "props - Object containing props that will be set to the component.",
297
- "name": "param"
296
+ "name": "param",
297
+ "text": "props - Object containing props that will be set to the component."
298
298
  }],
299
299
  "text": "- Object containing props that will be set to the component."
300
300
  }],
@@ -153,16 +153,19 @@
153
153
  width: 4em;
154
154
  }
155
155
  .f-button--wrapper .button.button--floating:hover, .f-button--wrapper .button.button--floating:focus {
156
- box-shadow: 0 0.35em 0.35em -3px rgba(var(--kup-text-color-rgb), 0.2), 0 0.57em 0.71em 0.07em rgba(var(--kup-text-color-rgb), 0.14), 0 0.21em 1em 0.14em rgba(var(--kup-text-color-rgb), 0.12);
156
+ box-shadow: 0 5px 5px -3px rgba(var(--kup-text-color-rgb), 0.2), 0 8px 10px 1px rgba(var(--kup-text-color-rgb), 0.14), 0 3px 14px 2px rgba(var(--kup-text-color-rgb), 0.12);
157
157
  }
158
158
  .f-button--wrapper .button.button--floating:active {
159
- box-shadow: 0 0.5em 0.57em -4px rgba(var(--kup-text-color-rgb), 0.2), 0 0.85em 1.21em 0.14em rgba(var(--kup-text-color-rgb), 0.14), 0 0.35em 1.57em 0.28em rgba(var(--kup-text-color-rgb), 0.12);
159
+ box-shadow: 0 7px 8px -4px rgba(var(--kup-text-color-rgb), 0.2), 0 12px 17px 2px rgba(var(--kup-text-color-rgb), 0.14), 0 5px 22px 4px rgba(var(--kup-text-color-rgb), 0.12);
160
160
  }
161
161
  .f-button--wrapper .button.button--raised {
162
- box-shadow: 0px 0.1em 0.1em 0 rgba(var(--kup-text-color-rgb), 0.125), 0px 0.2em 1em 0.1em rgba(var(--kup-text-color-rgb), 0.1), 0px 0.25em 1.5em 0.2em rgba(var(--kup-text-color-rgb), 0.075);
162
+ box-shadow: 0 3px 1px -2px rgba(var(--kup-text-color-rgb), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb), 0.12);
163
163
  }
164
- .f-button--wrapper .button.button--raised:hover {
165
- box-shadow: 0 0.25em 0.25em 0 rgba(var(--kup-text-color-rgb), 0.125), 0 0.75em 1em 0.1em rgba(var(--kup-text-color-rgb), 0.1), 0 0.25em 1.5em 0.2em rgba(var(--kup-text-color-rgb), 0.075);
164
+ .f-button--wrapper .button.button--raised:focus, .f-button--wrapper .button.button--raised:hover {
165
+ box-shadow: 0 2px 4px -1px rgba(var(--kup-text-color-rgb), 0.2), 0 4px 5px 0 rgba(var(--kup-text-color-rgb), 0.14), 0 1px 10px 0 rgba(var(--kup-text-color-rgb), 0.12);
166
+ }
167
+ .f-button--wrapper .button.button--raised:active {
168
+ box-shadow: 0 5px 5px -3px rgba(var(--kup-text-color-rgb), 0.2), 0 8px 10px 1px rgba(var(--kup-text-color-rgb), 0.14), 0 3px 14px 2px rgba(var(--kup-text-color-rgb), 0.12);
166
169
  }
167
170
  .f-button--wrapper .button.button--outlined {
168
171
  border-width: 1px;
@@ -298,11 +298,11 @@ export class KupProbe {
298
298
  "optional": false,
299
299
  "docs": {
300
300
  "tags": [{
301
- "text": "\"\"",
302
- "name": "default"
301
+ "name": "default",
302
+ "text": "\"\""
303
303
  }, {
304
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
305
- "name": "see"
304
+ "name": "see",
305
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
306
306
  }],
307
307
  "text": "Custom style of the component."
308
308
  },
@@ -322,11 +322,11 @@ export class KupProbe {
322
322
  "optional": false,
323
323
  "docs": {
324
324
  "tags": [{
325
- "text": "\"\"",
326
- "name": "default"
325
+ "name": "default",
326
+ "text": "\"\""
327
327
  }, {
328
- "text": "https ://ketchup.smeup.com/ketchup-showcase/#/customization",
329
- "name": "see"
328
+ "name": "see",
329
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
330
330
  }],
331
331
  "text": "Specify features to test."
332
332
  },