@sme.up/ketchup 11.0.0-SNAPSHOT-20250411125317 → 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.
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +236 -27
- package/dist/cjs/kup-autocomplete_29.cjs.entry.js +7 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/accordion.js +24 -23
- package/dist/collection/assets/dashboard.js +3 -9
- package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +6 -1
- package/dist/collection/components/kup-accordion/kup-accordion.css +10 -2
- package/dist/collection/components/kup-accordion/kup-accordion.js +442 -40
- package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +4 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +242 -29
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +3 -3
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-73922583.js → p-04bdcde6.js} +1 -1
- package/dist/components/{p-9cadb89a.js → p-154aa772.js} +2 -2
- package/dist/components/{p-2d17a388.js → p-9604d7b8.js} +2 -2
- package/dist/components/{p-f4cbdb5d.js → p-d814a4cb.js} +2 -2
- package/dist/components/{p-76ce24eb.js → p-e22a9cfc.js} +2 -2
- package/dist/components/{p-c50f899f.js → p-ece73808.js} +1868 -1859
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +237 -28
- package/dist/esm/kup-autocomplete_29.entry.js +7 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-527998c8.entry.js +1 -0
- package/dist/ketchup/{p-e9f77e3a.entry.js → p-b2a5caf8.entry.js} +1 -1
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +14 -7
- package/dist/types/components/kup-accordion/kup-accordion.d.ts +67 -6
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +6 -1
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +1 -1
- package/dist/types/components.d.ts +61 -12
- package/package.json +1 -1
- 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,
|
|
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"] = "
|
|
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;
|
|
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.
|
|
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.
|
|
66
|
-
const
|
|
67
|
-
const itemName =
|
|
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.
|
|
81
|
-
const
|
|
82
|
-
const itemName =
|
|
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(
|
|
115
|
-
const isItemExpandible = this.isItemExpandible(itemName);
|
|
195
|
+
async toggleItem(node) {
|
|
116
196
|
const ids = [...this.selectedItems];
|
|
117
|
-
if (ids.includes(
|
|
118
|
-
ids.splice(ids.indexOf(
|
|
197
|
+
if (ids.includes(node.id)) {
|
|
198
|
+
ids.splice(ids.indexOf(node.id), 1);
|
|
119
199
|
}
|
|
120
200
|
else {
|
|
121
|
-
ids.push(
|
|
201
|
+
ids.push(node.id);
|
|
122
202
|
}
|
|
123
203
|
this.selectedItems = ids;
|
|
124
|
-
|
|
125
|
-
this
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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.
|
|
150
|
-
const
|
|
151
|
-
const itemName =
|
|
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
|
-
|
|
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.
|
|
199
|
-
return (h(Host, { key: '
|
|
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.
|
|
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.
|
|
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":
|
|
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();
|