@sme.up/ketchup 11.0.0-SNAPSHOT-20250410104333 → 11.0.0-SNAPSHOT-20250414143939

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 (98) hide show
  1. package/dist/cjs/ketchup.cjs.js +1 -1
  2. package/dist/cjs/kup-accordion.cjs.entry.js +236 -27
  3. package/dist/cjs/kup-autocomplete_29.cjs.entry.js +7 -3
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/assets/accordion.js +24 -23
  6. package/dist/collection/assets/dashboard.js +3 -9
  7. package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +6 -1
  8. package/dist/collection/components/kup-accordion/kup-accordion.css +10 -2
  9. package/dist/collection/components/kup-accordion/kup-accordion.js +442 -40
  10. package/dist/collection/components/kup-image/assets/svg/bullseye-arrow.svg +1 -0
  11. package/dist/collection/components/kup-image/assets/svg/email-stacked.svg +1 -0
  12. package/dist/collection/components/kup-image/assets/svg/filter-off.svg +1 -0
  13. package/dist/collection/components/kup-image/assets/svg/status.svg +9 -0
  14. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +4 -0
  15. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +4 -4
  16. package/dist/components/index.js +1 -1
  17. package/dist/components/kup-accordion.js +242 -29
  18. package/dist/components/kup-activity-timeline.js +2 -2
  19. package/dist/components/kup-autocomplete.js +1 -1
  20. package/dist/components/kup-badge.js +1 -1
  21. package/dist/components/kup-box.js +1 -1
  22. package/dist/components/kup-button-list.js +1 -1
  23. package/dist/components/kup-button.js +1 -1
  24. package/dist/components/kup-calendar.js +2 -2
  25. package/dist/components/kup-card-list.js +3 -3
  26. package/dist/components/kup-card.js +1 -1
  27. package/dist/components/kup-cell.js +2 -2
  28. package/dist/components/kup-chart.js +1 -1
  29. package/dist/components/kup-checkbox.js +1 -1
  30. package/dist/components/kup-chip.js +1 -1
  31. package/dist/components/kup-color-picker.js +1 -1
  32. package/dist/components/kup-combobox.js +1 -1
  33. package/dist/components/kup-dashboard.js +2 -2
  34. package/dist/components/kup-data-table.js +1 -1
  35. package/dist/components/kup-date-picker.js +1 -1
  36. package/dist/components/kup-dialog.js +1 -1
  37. package/dist/components/kup-drawer.js +2 -2
  38. package/dist/components/kup-dropdown-button.js +1 -1
  39. package/dist/components/kup-echart.js +1 -1
  40. package/dist/components/kup-editor.js +1 -1
  41. package/dist/components/kup-family-tree.js +3 -3
  42. package/dist/components/kup-file-upload.js +1 -1
  43. package/dist/components/kup-form.js +1 -1
  44. package/dist/components/kup-gauge.js +1 -1
  45. package/dist/components/kup-grid.js +1 -1
  46. package/dist/components/kup-htm.js +2 -2
  47. package/dist/components/kup-iframe.js +2 -2
  48. package/dist/components/kup-image-list.js +2 -2
  49. package/dist/components/kup-image.js +1 -1
  50. package/dist/components/kup-input-panel.js +3 -3
  51. package/dist/components/kup-lazy.js +2 -2
  52. package/dist/components/kup-list.js +1 -1
  53. package/dist/components/kup-magic-box.js +4 -4
  54. package/dist/components/kup-nav-bar.js +2 -2
  55. package/dist/components/kup-numeric-picker.js +2 -2
  56. package/dist/components/kup-object-field.js +2 -2
  57. package/dist/components/kup-pdf.js +2 -2
  58. package/dist/components/kup-planner.js +2 -2
  59. package/dist/components/kup-probe.js +2 -2
  60. package/dist/components/kup-progress-bar.js +1 -1
  61. package/dist/components/kup-qlik.js +2 -2
  62. package/dist/components/kup-radio.js +1 -1
  63. package/dist/components/kup-rating.js +1 -1
  64. package/dist/components/kup-snackbar.js +2 -2
  65. package/dist/components/kup-spinner.js +1 -1
  66. package/dist/components/kup-switch.js +1 -1
  67. package/dist/components/kup-tab-bar.js +1 -1
  68. package/dist/components/kup-text-field.js +1 -1
  69. package/dist/components/kup-time-picker.js +1 -1
  70. package/dist/components/kup-toolbar.js +1 -1
  71. package/dist/components/kup-tree.js +1 -1
  72. package/dist/components/kup-txt.js +2 -2
  73. package/dist/components/kup-typography-list.js +2 -2
  74. package/dist/components/kup-typography.js +2 -2
  75. package/dist/components/{p-73922583.js → p-04bdcde6.js} +1 -1
  76. package/dist/components/{p-9cadb89a.js → p-154aa772.js} +2 -2
  77. package/dist/components/{p-2d17a388.js → p-9604d7b8.js} +2 -2
  78. package/dist/components/{p-f4cbdb5d.js → p-d814a4cb.js} +2 -2
  79. package/dist/components/{p-76ce24eb.js → p-e22a9cfc.js} +2 -2
  80. package/dist/components/{p-c50f899f.js → p-ece73808.js} +1868 -1859
  81. package/dist/esm/ketchup.js +1 -1
  82. package/dist/esm/kup-accordion.entry.js +237 -28
  83. package/dist/esm/kup-autocomplete_29.entry.js +7 -3
  84. package/dist/esm/loader.js +1 -1
  85. package/dist/ketchup/assets/svg/bullseye-arrow.svg +1 -0
  86. package/dist/ketchup/assets/svg/email-stacked.svg +1 -0
  87. package/dist/ketchup/assets/svg/filter-off.svg +1 -0
  88. package/dist/ketchup/assets/svg/status.svg +9 -0
  89. package/dist/ketchup/ketchup.esm.js +1 -1
  90. package/dist/ketchup/p-527998c8.entry.js +1 -0
  91. package/dist/ketchup/{p-e9f77e3a.entry.js → p-b2a5caf8.entry.js} +1 -1
  92. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +14 -7
  93. package/dist/types/components/kup-accordion/kup-accordion.d.ts +67 -6
  94. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +6 -1
  95. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +1 -1
  96. package/dist/types/components.d.ts +61 -12
  97. package/package.json +1 -1
  98. package/dist/ketchup/p-c832734a.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-9b0f4a0d.js';
2
- import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, d as KupThemeColorValues, b as KupThemeIconValues } from './kup-manager-a3f8ee8f.js';
2
+ import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeIconValues, d as KupThemeColorValues, c as KupDynamicPositionPlacement } from './kup-manager-a3f8ee8f.js';
3
3
  import { F as FImage } from './f-image-a2ecd7c3.js';
4
4
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
5
5
  import { M as MDCRipple } from './component-a35bc7f1.js';
@@ -12,33 +12,114 @@ import './kup-dates-da19044e.js';
12
12
  var KupAccordionProps;
13
13
  (function (KupAccordionProps) {
14
14
  KupAccordionProps["customStyle"] = "Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";
15
- KupAccordionProps["data"] = "Data of the accordion.";
15
+ KupAccordionProps["data"] = "List of elements.";
16
+ KupAccordionProps["infoIcon"] = "When true, it will show the info activation icon";
16
17
  KupAccordionProps["ripple"] = "When enabled displays Material's ripple effect on item headers.";
18
+ KupAccordionProps["toolbar"] = "When true, it will show the toolbar activation icon";
19
+ KupAccordionProps["sizing"] = "Sets the type of the component sizing.";
20
+ KupAccordionProps["toolbarCallback"] = "Callback to be called when the toolbar icon is clicked";
21
+ KupAccordionProps["infoCallback"] = "Callback to be called when the info icon is clicked";
17
22
  })(KupAccordionProps || (KupAccordionProps = {}));
18
23
 
19
- const kupAccordionCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";
24
+ const kupAccordionCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px;gap:var(--kup-space-03)}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header .f-image{margin:0}.accordion-item__header .accordion-rigtbuttons{margin-left:auto;margin-right:0;display:flex;gap:var(--kup-space-03)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";
20
25
  const KupAccordionStyle0 = kupAccordionCss;
21
26
 
27
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
28
+ if (kind === "m")
29
+ throw new TypeError("Private method is not writable");
30
+ if (kind === "a" && !f)
31
+ throw new TypeError("Private accessor was defined without a setter");
32
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
33
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
34
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
35
+ };
36
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
37
+ if (kind === "a" && !f)
38
+ throw new TypeError("Private accessor was defined without a getter");
39
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
40
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
41
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
42
+ };
43
+ var _KupAccordion_clickCbDropCard, _KupAccordion_dropDownActionCardAnchor;
22
44
  const KupAccordion = class {
23
45
  constructor(hostRef) {
24
46
  registerInstance(this, hostRef);
25
- this.kupAccordionItemSelected = createEvent(this, "kup-accordion-itemselected", 6);
47
+ this.kupBlur = createEvent(this, "kup-accordion-blur", 6);
48
+ this.kupClick = createEvent(this, "kup-accordion-click", 6);
49
+ this.kupIconClick = createEvent(this, "kup-accordion-iconclick", 6);
50
+ this.kupInfoIconClick = createEvent(this, "kup-accordion-infoiconclick", 6);
51
+ this.kupFocus = createEvent(this, "kup-accordion-focus", 6);
52
+ this.kupToolbarItemClick = createEvent(this, "kup-accordion-toolbaritemclick", 6);
26
53
  /*-------------------------------------------------*/
27
54
  /* I n t e r n a l V a r i a b l e s */
28
55
  /*-------------------------------------------------*/
56
+ this.toolbarState = [];
57
+ this.infoState = [];
29
58
  /**
30
59
  * Instance of the KupManager class.
31
60
  */
32
61
  this.kupManager = kupManagerInstance();
62
+ _KupAccordion_clickCbDropCard.set(this, null);
33
63
  /**
34
64
  * Instance of the KupManager class.
35
65
  */
36
66
  this.slotsNames = [];
67
+ _KupAccordion_dropDownActionCardAnchor.set(this, null);
37
68
  this.selectedItems = [];
38
69
  this.customStyle = '';
39
70
  this.data = null;
71
+ this.infoIcon = false;
40
72
  this.ripple = false;
73
+ this.toolbar = false;
41
74
  this.sizing = KupComponentSizing.SMALL;
75
+ this.toolbarCallback = undefined;
76
+ this.infoCallback = undefined;
77
+ }
78
+ onKupBlur(node) {
79
+ this.kupBlur.emit({
80
+ comp: this,
81
+ id: this.rootElement.id,
82
+ node: node,
83
+ });
84
+ }
85
+ onKupClick(i, node) {
86
+ this.data[i].contentVisible = !this.data[i].contentVisible;
87
+ this.updateSelectedItems();
88
+ this.kupClick.emit({
89
+ comp: this,
90
+ id: this.rootElement.id,
91
+ node: node,
92
+ });
93
+ }
94
+ onKupIconClick(el) {
95
+ if (!el) {
96
+ this.kupManager.debug.logMessage(this, 'onKupIconClick: Element is null');
97
+ return;
98
+ }
99
+ __classPrivateFieldSet(this, _KupAccordion_dropDownActionCardAnchor, el, "f");
100
+ this.createDropDownToolbarList();
101
+ }
102
+ onKupInfoIconClick(el) {
103
+ if (!el) {
104
+ this.kupManager.debug.logMessage(this, 'onKupIconClick: Element is null');
105
+ return;
106
+ }
107
+ __classPrivateFieldSet(this, _KupAccordion_dropDownActionCardAnchor, el, "f");
108
+ this.createDropDownInfoList();
109
+ }
110
+ onKupFocus(node) {
111
+ this.kupFocus.emit({
112
+ comp: this,
113
+ id: this.rootElement.id,
114
+ node: node,
115
+ });
116
+ }
117
+ onKupToolbarItemClick(e) {
118
+ this.kupToolbarItemClick.emit({
119
+ comp: this,
120
+ id: this.rootElement.id,
121
+ node: e.detail.selected,
122
+ });
42
123
  }
43
124
  /*-------------------------------------------------*/
44
125
  /* W a t c h e r s */
@@ -62,9 +143,9 @@ const KupAccordion = class {
62
143
  */
63
144
  async collapseAll() {
64
145
  const ids = [];
65
- for (let i = 0; i < this.data.columns.length; i++) {
66
- const column = this.data.columns[i];
67
- const itemName = column.name;
146
+ for (let i = 0; i < this.data.length; i++) {
147
+ const node = this.data[i];
148
+ const itemName = node.id;
68
149
  if (!this.isItemExpandible(itemName) &&
69
150
  this.isItemSelected(itemName)) {
70
151
  ids.push(itemName);
@@ -77,9 +158,9 @@ const KupAccordion = class {
77
158
  */
78
159
  async expandAll() {
79
160
  const ids = [];
80
- for (let i = 0; i < this.data.columns.length; i++) {
81
- const column = this.data.columns[i];
82
- const itemName = column.name;
161
+ for (let i = 0; i < this.data.length; i++) {
162
+ const node = this.data[i];
163
+ const itemName = node.id;
83
164
  if (this.isItemExpandible(itemName)) {
84
165
  ids.push(itemName);
85
166
  }
@@ -111,27 +192,34 @@ const KupAccordion = class {
111
192
  * This method activates or deactivates an item
112
193
  * @param {string} itemName - Name of the item.
113
194
  */
114
- async toggleItem(itemName) {
115
- const isItemExpandible = this.isItemExpandible(itemName);
195
+ async toggleItem(node) {
116
196
  const ids = [...this.selectedItems];
117
- if (ids.includes(itemName)) {
118
- ids.splice(ids.indexOf(itemName), 1);
197
+ if (ids.includes(node.id)) {
198
+ ids.splice(ids.indexOf(node.id), 1);
119
199
  }
120
200
  else {
121
- ids.push(itemName);
201
+ ids.push(node.id);
122
202
  }
123
203
  this.selectedItems = ids;
124
- if (!isItemExpandible) {
125
- this.kupAccordionItemSelected.emit({
126
- comp: this,
127
- id: this.rootElement.id,
128
- itemName: itemName,
129
- });
130
- }
204
+ this.kupClick.emit({
205
+ comp: this,
206
+ id: this.rootElement.id,
207
+ node: node,
208
+ });
131
209
  }
132
210
  /*-------------------------------------------------*/
133
211
  /* P r i v a t e M e t h o d s */
134
212
  /*-------------------------------------------------*/
213
+ updateSelectedItems() {
214
+ const ids = [];
215
+ for (let i = 0; i < this.data.length; i++) {
216
+ const node = this.data[i];
217
+ if (node.contentVisible) {
218
+ ids.push(node.id);
219
+ }
220
+ }
221
+ this.selectedItems = ids;
222
+ }
135
223
  isItemExpandible(itemName) {
136
224
  return this.slotsNames.includes(itemName);
137
225
  }
@@ -139,6 +227,7 @@ const KupAccordion = class {
139
227
  return this.selectedItems.includes(itemName);
140
228
  }
141
229
  renderItems() {
230
+ var _a, _b;
142
231
  const items = [];
143
232
  const slots = Array.prototype.slice.call(this.rootElement.children, 0);
144
233
  this.slotsNames = [];
@@ -146,9 +235,9 @@ const KupAccordion = class {
146
235
  const slot = slots[index];
147
236
  this.slotsNames.push(slot.slot);
148
237
  }
149
- for (let i = 0; i < this.data.columns.length; i++) {
150
- const column = this.data.columns[i];
151
- const itemName = column.name;
238
+ for (let i = 0; i < this.data.length; i++) {
239
+ const node = this.data[i];
240
+ const itemName = node.id;
152
241
  const isItemSelected = this.isItemSelected(itemName);
153
242
  const isItemExpandible = this.isItemExpandible(itemName);
154
243
  const itemHeaderClass = {
@@ -164,10 +253,128 @@ const KupAccordion = class {
164
253
  ? true
165
254
  : false,
166
255
  };
167
- items.push(h("div", { class: "accordion-item" }, h("div", { tabindex: "1", title: column.title, class: itemHeaderClass, onClick: () => this.toggleItem(itemName) }, column.icon ? (h(FImage, { color: `var(${KupThemeColorValues.ICON})`, resource: column.icon, sizeX: "1.5em", sizeY: "1.5em", wrapperClass: "accordion-item__icon" })) : null, h("span", { class: "accordion-item__text" }, column.title), isItemExpandible ? (h("span", { class: `accordion-item__dropdown kup-icon ${KupThemeIconValues.DROPDOWN.replace('--', '')}` })) : null), h("div", { class: itemContentClass }, h("slot", { name: column.name }))));
256
+ const wrapper = (h("div", { class: "accordion-rigtbuttons" }, this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
257
+ event.stopPropagation();
258
+ const el = event.currentTarget;
259
+ const data = await this.infoCallback();
260
+ this.infoState = data;
261
+ if (this.infoState.length > 0) {
262
+ this.onKupInfoIconClick(el);
263
+ }
264
+ else {
265
+ this.kupManager.debug.logMessage(this, 'InfoIcon data is empty, not opening dropdown.');
266
+ }
267
+ }, wrapperClass: "tab__iconToolbar iconInfo" })), this.toolbar && (h(FImage, { resource: "more_vert", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
268
+ event.stopPropagation();
269
+ const el = event.currentTarget;
270
+ const data = await this.toolbarCallback();
271
+ this.toolbarState = data;
272
+ if (this.toolbarState.length > 0) {
273
+ this.onKupIconClick(el);
274
+ }
275
+ else {
276
+ this.kupManager.debug.logMessage(this, 'Toolbar data is empty, not opening dropdown.');
277
+ }
278
+ }, wrapperClass: "tab__iconToolbar iconToolbar" })), isItemExpandible ? (h("div", { class: `accordion-item__dropdown kup-icon ${KupThemeIconValues.DROPDOWN.replace('--', '')}` })) : null));
279
+ items.push(h("div", { class: "accordion-item" }, h("div", { tabindex: i, title: (_a = node.title) !== null && _a !== void 0 ? _a : null, class: itemHeaderClass, onClick: () => this.toggleItem(node), onBlur: () => this.onKupBlur(node),
280
+ // onClick={() => this.onKupClick(i, node)}
281
+ onFocus: () => this.onKupFocus(node) }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, sizeX: "1.5em", sizeY: "1.5em", wrapperClass: "accordion-item__icon" })) : null, node.value ? (h("span", { class: "accordion-item__text" }, (_b = node.value) !== null && _b !== void 0 ? _b : '')) : null, wrapper), h("div", { class: itemContentClass }, h("slot", { name: node.id }))));
168
282
  }
169
283
  return items;
170
284
  }
285
+ closeRowToolbarList() {
286
+ if (this.toolbarList) {
287
+ this.kupManager.dynamicPosition.stop(this.toolbarList);
288
+ this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"));
289
+ this.toolbarList.remove();
290
+ this.kupManager.dynamicPosition.unregister([this.toolbarList]);
291
+ this.toolbarList = null;
292
+ }
293
+ }
294
+ /**
295
+ * Create dropdown list for toolbar
296
+ */
297
+ createDropDownToolbarList() {
298
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
299
+ this.kupManager.debug.logMessage(this, 'createDropDownToolbarList: Anchor is null!');
300
+ return;
301
+ }
302
+ if (this.toolbarList) {
303
+ this.closeRowToolbarList();
304
+ }
305
+ if (this.toolbarState.length === 0) {
306
+ this.kupManager.debug.logMessage(this, 'No toolbar state available.');
307
+ return;
308
+ }
309
+ const listEl = document.createElement('kup-toolbar');
310
+ listEl.data = this.toolbarState;
311
+ listEl.addEventListener('kup-toolbar-click', (e) => {
312
+ this.onKupToolbarItemClick(e);
313
+ setTimeout(() => {
314
+ this.closeRowToolbarList();
315
+ }, 0);
316
+ });
317
+ this.toolbarList = listEl;
318
+ __classPrivateFieldSet(this, _KupAccordion_clickCbDropCard, {
319
+ cb: () => {
320
+ this.closeRowToolbarList();
321
+ },
322
+ el: this.toolbarList,
323
+ }, "f");
324
+ this.kupManager.addClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"), true);
325
+ this.rootElement.shadowRoot.appendChild(this.toolbarList);
326
+ requestAnimationFrame(() => {
327
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
328
+ this.kupManager.debug.logMessage(this, 'DropDown anchor is still null after delay!');
329
+ return;
330
+ }
331
+ this.kupManager.dynamicPosition.register(this.toolbarList, __classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
332
+ this.kupManager.dynamicPosition.start(this.toolbarList);
333
+ });
334
+ }
335
+ /**
336
+ * Create dropdown list for tab info icon
337
+ */
338
+ createDropDownInfoList() {
339
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
340
+ this.kupManager.debug.logMessage(this, 'createDropDownToolbarList: Anchor is null!');
341
+ return;
342
+ }
343
+ if (this.infoList) {
344
+ this.closeInfoDataList();
345
+ }
346
+ if (this.infoState.length === 0) {
347
+ this.kupManager.debug.logMessage(this, 'No toolbar state available.');
348
+ return;
349
+ }
350
+ const listEl = document.createElement('kup-list');
351
+ listEl.data = this.infoState;
352
+ this.infoList = listEl;
353
+ __classPrivateFieldSet(this, _KupAccordion_clickCbDropCard, {
354
+ cb: () => {
355
+ this.closeInfoDataList();
356
+ },
357
+ el: this.infoList,
358
+ }, "f");
359
+ this.kupManager.addClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"), true);
360
+ this.rootElement.shadowRoot.appendChild(this.infoList);
361
+ requestAnimationFrame(() => {
362
+ this.kupManager.dynamicPosition.register(this.infoList, __classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
363
+ this.kupManager.dynamicPosition.start(this.infoList);
364
+ });
365
+ }
366
+ /**
367
+ * Destroy dropdown list for tab info icon
368
+ */
369
+ closeInfoDataList() {
370
+ if (this.infoList) {
371
+ this.kupManager.dynamicPosition.stop(this.infoList);
372
+ this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"));
373
+ this.infoList.remove();
374
+ this.kupManager.dynamicPosition.unregister([this.infoList]);
375
+ this.infoList = null;
376
+ }
377
+ }
171
378
  /*-------------------------------------------------*/
172
379
  /* L i f e c y c l e H o o k s */
173
380
  /*-------------------------------------------------*/
@@ -176,6 +383,7 @@ const KupAccordion = class {
176
383
  this.kupManager.theme.register(this);
177
384
  }
178
385
  componentDidLoad() {
386
+ this.updateSelectedItems();
179
387
  this.applyRipple();
180
388
  this.kupManager.debug.logLoad(this, true);
181
389
  }
@@ -195,8 +403,8 @@ const KupAccordion = class {
195
403
  this.kupManager.debug.logRender(this, true);
196
404
  }
197
405
  render() {
198
- const content = this.data && this.data.columns ? this.renderItems() : null;
199
- return (h(Host, { key: 'e833d2f12eaadc0a52bbfa292e29c92e3a7d737c' }, h("style", { key: '93b4315cd2a0f9834ec9f4cf70c0c2cf6baf91cb' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: 'a9cbd70c8e08f1b00cdee843c8b34540e49a7541', id: componentWrapperId }, h("div", { key: '9ddf2bd8d16f97c3004948e31dcd2bb17ee155b6', class: "accordion" }, content))));
406
+ const content = this.data && this.data.length ? this.renderItems() : null;
407
+ return (h(Host, { key: '1eab0235eab32cfa1132d4f918b56e2788f10e3e' }, h("style", { key: '5562ce0c27752221054bfe75c5bc0fa73483c551' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: '8023ab06eb1040fd72788e4e94f8cf520da31a12', id: componentWrapperId }, h("div", { key: '8cfc0ba359969c76ff2dab13ed3c80f3e03e5828', class: "accordion" }, content))));
200
408
  }
201
409
  disconnectedCallback() {
202
410
  this.kupManager.theme.unregister(this);
@@ -206,6 +414,7 @@ const KupAccordion = class {
206
414
  "ripple": ["applyRipple"]
207
415
  }; }
208
416
  };
417
+ _KupAccordion_clickCbDropCard = new WeakMap(), _KupAccordion_dropDownActionCardAnchor = new WeakMap();
209
418
  KupAccordion.style = KupAccordionStyle0;
210
419
 
211
420
  export { KupAccordion as kup_accordion };
@@ -17540,9 +17540,13 @@ var KupTabBarProps;
17540
17540
  (function (KupTabBarProps) {
17541
17541
  KupTabBarProps["customStyle"] = "Custom style of the component.";
17542
17542
  KupTabBarProps["data"] = "List of elements.";
17543
+ KupTabBarProps["dense"] = "When true, the component will be more compact.";
17544
+ KupTabBarProps["infoIcon"] = "Icon to be shown in the info button";
17543
17545
  KupTabBarProps["ripple"] = "When enabled displays Material's ripple effect on item headers.";
17544
17546
  KupTabBarProps["toolbar"] = "when true, it will show the toolbar activation icon";
17545
17547
  KupTabBarProps["variant"] = "Variant of the component. It is either flat or contained";
17548
+ KupTabBarProps["toolbarCallback"] = "Callback to be called when the toolbar icon is clicked";
17549
+ KupTabBarProps["infoCallback"] = "Callback to be called when the info icon is clicked";
17546
17550
  })(KupTabBarProps || (KupTabBarProps = {}));
17547
17551
  /**
17548
17552
  * Styling options for the f-button component.
@@ -17585,7 +17589,7 @@ const KupTabBar = class {
17585
17589
  this.kupIconClick = createEvent(this, "kup-tabbar-iconclick", 6);
17586
17590
  this.kupInfoIconClick = createEvent(this, "kup-tabbar-infoiconclick", 6);
17587
17591
  this.kupFocus = createEvent(this, "kup-tabbar-focus", 6);
17588
- this.kupItemClick = createEvent(this, "kup-tabbar-itemclick", 6);
17592
+ this.kupToolbarItemClick = createEvent(this, "kup-tabbar-toolbaritemclick", 6);
17589
17593
  /*-------------------------------------------------*/
17590
17594
  /* I n t e r n a l V a r i a b l e s */
17591
17595
  /*-------------------------------------------------*/
@@ -17658,7 +17662,7 @@ const KupTabBar = class {
17658
17662
  });
17659
17663
  }
17660
17664
  onKupToolbarItemClick(e) {
17661
- this.kupItemClick.emit({
17665
+ this.kupToolbarItemClick.emit({
17662
17666
  comp: this,
17663
17667
  id: this.rootElement.id,
17664
17668
  value: this.value,
@@ -17872,7 +17876,7 @@ const KupTabBar = class {
17872
17876
  'kup-dense': this.dense,
17873
17877
  'kup-danger': node.danger,
17874
17878
  };
17875
- const tabEl = (h("f-button", { class: tabClass, role: "tab", "aria-selected": this.data[i].active ? true : false, tabIndex: i, title: node.title ? node.title : null, onBlur: () => this.onKupBlur(i, node), onClick: () => this.onKupClick(i, node), onFocus: () => this.onKupFocus(i, node) }, h("span", { class: "tab__content" }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, wrapperClass: "tab__icon" })) : null, node.value ? (h("span", { class: "tab__text-label" }, this.data[i].value)) : null), this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
17879
+ const tabEl = (h("f-button", { class: tabClass, role: "tab", "aria-selected": node.active ? true : false, tabIndex: i, title: node.title ? node.title : null, onBlur: () => this.onKupBlur(i, node), onClick: () => this.onKupClick(i, node), onFocus: () => this.onKupFocus(i, node) }, h("span", { class: "tab__content" }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, wrapperClass: "tab__icon" })) : null, node.value ? (h("span", { class: "tab__text-label" }, node.value)) : null), this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
17876
17880
  event.stopPropagation();
17877
17881
  const el = event.currentTarget;
17878
17882
  const data = await this.infoCallback();