@sula-tech/webcomponents 0.18.0 → 0.19.1
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/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_31.cjs.entry.js +56 -29
- package/dist/cjs/sula-avatar_31.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
- package/dist/collection/components/sula-button/sula-button.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-loader/sula-loader.css +1 -1
- package/dist/collection/components/sula-menu/model/sula-menu.model.js +11 -1
- package/dist/collection/components/sula-menu/model/sula-menu.model.js.map +1 -1
- package/dist/collection/components/sula-menu/sula-menu.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +124 -9
- package/dist/collection/components/sula-menu/sula-menu.js.map +1 -1
- package/dist/collection/components/sula-menu/sula-menu.stories.js +94 -1
- package/dist/collection/components/sula-menu/sula-menu.stories.js.map +1 -1
- package/dist/collection/components/sula-modal/sula-modal.css +1 -1
- package/dist/collection/components/sula-modal/sula-modal.js +12 -14
- package/dist/collection/components/sula-modal/sula-modal.js.map +1 -1
- package/dist/collection/index.js +10 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +15 -1640
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-BmmVNrHj.js → p-BddXO6fP.js} +4 -4
- package/dist/components/{p-BmmVNrHj.js.map → p-BddXO6fP.js.map} +1 -1
- package/dist/components/{p-C5KdnXMt.js → p-CnGkvX5w.js} +4 -4
- package/dist/components/{p-C5KdnXMt.js.map → p-CnGkvX5w.js.map} +1 -1
- package/dist/components/{p-Dw0d4f_W.js → p-CnjVJ_xQ.js} +6 -6
- package/dist/components/{p-Dw0d4f_W.js.map → p-CnjVJ_xQ.js.map} +1 -1
- package/dist/components/p-Cy4ZswbA.js +1643 -0
- package/dist/components/p-Cy4ZswbA.js.map +1 -0
- package/dist/components/{p-DLb0tgPZ.js → p-DE4pFpiq.js} +4 -4
- package/dist/components/{p-DLb0tgPZ.js.map → p-DE4pFpiq.js.map} +1 -1
- package/dist/components/{p-KKlHc24i.js → p-DoTL1gHf.js} +5 -5
- package/dist/components/{p-KKlHc24i.js.map → p-DoTL1gHf.js.map} +1 -1
- package/dist/components/{p-CfgBBJOb.js → p-f7rEWsEo.js} +4 -4
- package/dist/components/{p-CfgBBJOb.js.map → p-f7rEWsEo.js.map} +1 -1
- package/dist/components/sula-avatar.js +3 -3
- package/dist/components/sula-badge.js +2 -2
- package/dist/components/sula-breadcrumb.js +2 -2
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-checkbox.js +2 -2
- package/dist/components/sula-chip.js +3 -3
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +5 -5
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.js +44 -12
- package/dist/components/sula-menu.js.map +1 -1
- package/dist/components/sula-modal.js +17 -19
- package/dist/components/sula-modal.js.map +1 -1
- package/dist/components/sula-progress-bar.js +2 -2
- package/dist/components/sula-radio-button.js +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +2 -2
- package/dist/components/sula-switch.js +1 -1
- package/dist/components/sula-table-body.js +1 -1
- package/dist/components/sula-table-cell.js +1 -1
- package/dist/components/sula-table-head-cell.js +1 -1
- package/dist/components/sula-table-header.js +1 -1
- package/dist/components/sula-table-row.js +1 -1
- package/dist/components/sula-table.js +1 -1
- package/dist/components/sula-tag.js +2 -2
- package/dist/components/sula-textarea.js +1 -1
- package/dist/components/sula-textfield.js +2 -2
- package/dist/components/sula-tiles.js +2 -2
- package/dist/components/sula-timeline-list.js +2 -2
- package/dist/components/sula-toggle.js +2 -2
- package/dist/components/sula-tooltip.js +2 -2
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_31.entry.js +56 -29
- package/dist/esm/sula-avatar_31.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-menu/model/sula-menu.model.d.ts +9 -0
- package/dist/types/components/sula-menu/sula-menu.d.ts +31 -1
- package/dist/types/components/sula-menu/sula-menu.stories.d.ts +42 -1
- package/dist/types/components/sula-modal/sula-modal.d.ts +1 -0
- package/dist/types/components.d.ts +68 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +16 -1
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/{p-9244229f.entry.js → p-b5c2f1e3.entry.js} +68 -38
- package/dist/webcomponents/p-b5c2f1e3.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +8 -5
- package/package.json +1 -1
- package/dist/webcomponents/p-9244229f.entry.js.map +0 -1
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["sula-avatar_31",[[1,"sula-icon-picker",{"label":[1025],"required":[1028],"disabled":[1028],"error":[1025],"value":[1025],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"icons":[1040],"maxVisibleIcons":[2,"max-visible-icons"],"menuMaxHeight":[2,"menu-max-height"],"selectedIcon":[32],"searchTerm":[32]},null,{"value":["handleValueChange"],"icons":["handleIconsChange"]}],[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-menu",{"menuTitle":[1,"menu-title"],"image":[1],"items":[1040],"collapsed":[32],"previewExpanded":[32],"selectedItem":[32]},null,{"items":["syncSelectedItemFromItems"]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"maskPatternSwitchMaxLength":[2,"mask-pattern-switch-max-length"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"],"maskPattern":["watchMaskPatternHandler"],"maskPatternSwitchMaxLength":["watchMaskPatternSwitchMaxLengthHandler"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-toggle",{"selected":[1028],"buttonDisabled":[1028,"button-disabled"],"icon":[1]}],[1,"sula-tooltip",{"text":[1],"position":[1],"icon":[1],"iconClass":[1,"icon-class"],"focused":[4],"trigger":[1],"isVisible":[32]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[4,"sula-table",{"density":[1],"equalWidth":[4,"equal-width"],"fullWidth":[4,"full-width"]}],[4,"sula-table-body"],[4,"sula-table-cell"],[4,"sula-table-head-cell"],[4,"sula-table-header"],[4,"sula-table-row"],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"hasError":[1540,"has-error"],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"contentMaxHeight":[2,"content-max-height"],"customContent":[516,"custom-content"],"closeOnSelect":[4,"close-on-select"],"showContent":[1540,"show-content"],"selectedItem":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showContent":["handleShowContentChange"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["sula-avatar_31",[[1,"sula-icon-picker",{"label":[1025],"required":[1028],"disabled":[1028],"error":[1025],"value":[1025],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"icons":[1040],"maxVisibleIcons":[2,"max-visible-icons"],"menuMaxHeight":[2,"menu-max-height"],"selectedIcon":[32],"searchTerm":[32]},null,{"value":["handleValueChange"],"icons":["handleIconsChange"]}],[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-menu",{"menuTitle":[1,"menu-title"],"image":[1],"width":[1],"density":[1],"labelOverflow":[1,"label-overflow"],"items":[1040],"collapsed":[32],"previewExpanded":[32],"selectedItem":[32]},null,{"items":["syncSelectedItemFromItems"]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"maskPatternSwitchMaxLength":[2,"mask-pattern-switch-max-length"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"],"maskPattern":["watchMaskPatternHandler"],"maskPatternSwitchMaxLength":["watchMaskPatternSwitchMaxLengthHandler"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-toggle",{"selected":[1028],"buttonDisabled":[1028,"button-disabled"],"icon":[1]}],[1,"sula-tooltip",{"text":[1],"position":[1],"icon":[1],"iconClass":[1,"icon-class"],"focused":[4],"trigger":[1],"isVisible":[32]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[4,"sula-table",{"density":[1],"equalWidth":[4,"equal-width"],"fullWidth":[4,"full-width"]}],[4,"sula-table-body"],[4,"sula-table-cell"],[4,"sula-table-head-cell"],[4,"sula-table-header"],[4,"sula-table-row"],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"hasError":[1540,"has-error"],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"contentMaxHeight":[2,"content-max-height"],"customContent":[516,"custom-content"],"closeOnSelect":[4,"close-on-select"],"showContent":[1540,"show-content"],"selectedItem":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showContent":["handleShowContentChange"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=webcomponents.js.map
|
|
22
22
|
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export declare enum SulaMenuDensity {
|
|
2
|
+
Compact = "compact",
|
|
3
|
+
Default = "default",
|
|
4
|
+
Comfortable = "comfortable"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SulaMenuLabelOverflow {
|
|
7
|
+
Truncate = "truncate",
|
|
8
|
+
Wrap = "wrap"
|
|
9
|
+
}
|
|
1
10
|
export interface SulaMenuMainItem extends SulaMenuItem {
|
|
2
11
|
children?: SulaMenuSubItem[];
|
|
3
12
|
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { SelectedMenuItem, SulaMenuItem, SulaMenuMainItem, SulaMenuSubItem } from './model/sula-menu.model';
|
|
2
|
+
import { SelectedMenuItem, SulaMenuDensity, SulaMenuItem, SulaMenuLabelOverflow, SulaMenuMainItem, SulaMenuSubItem } from './model/sula-menu.model';
|
|
3
|
+
/**
|
|
4
|
+
* Hierarchical navigation menu with collapsible and preview states.
|
|
5
|
+
*
|
|
6
|
+
* @part shell - Main visual container of the menu.
|
|
7
|
+
* @part title - Menu title.
|
|
8
|
+
* @part main-item-label - Label of each top-level menu item.
|
|
9
|
+
* @part toggle-label - Label of the collapse/expand control.
|
|
10
|
+
* @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.
|
|
11
|
+
* @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.
|
|
12
|
+
* @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.
|
|
13
|
+
* @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.
|
|
14
|
+
* @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.
|
|
15
|
+
* @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.
|
|
16
|
+
*/
|
|
3
17
|
export declare class SulaMenu {
|
|
4
18
|
/**
|
|
5
19
|
* Menu title
|
|
@@ -9,6 +23,20 @@ export declare class SulaMenu {
|
|
|
9
23
|
* Menu image
|
|
10
24
|
*/
|
|
11
25
|
image: string;
|
|
26
|
+
/**
|
|
27
|
+
* Menu width in expanded state. Use a CSS length that does not depend on the
|
|
28
|
+
* host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).
|
|
29
|
+
*/
|
|
30
|
+
width: string;
|
|
31
|
+
/**
|
|
32
|
+
* Density applied to top-level menu items.
|
|
33
|
+
*/
|
|
34
|
+
density: SulaMenuDensity;
|
|
35
|
+
/**
|
|
36
|
+
* Overflow behavior for top-level item labels. Wrap displays up to two lines
|
|
37
|
+
* by default; the limit can be customized with --sula-menu-main-item-max-lines.
|
|
38
|
+
*/
|
|
39
|
+
labelOverflow: SulaMenuLabelOverflow;
|
|
12
40
|
/**
|
|
13
41
|
* Menu items
|
|
14
42
|
*/
|
|
@@ -30,6 +58,8 @@ export declare class SulaMenu {
|
|
|
30
58
|
collapsed: boolean;
|
|
31
59
|
previewExpanded: boolean;
|
|
32
60
|
selectedItem?: SelectedMenuItem;
|
|
61
|
+
private get normalizedWidth();
|
|
62
|
+
private get hostStyleVariables();
|
|
33
63
|
componentWillLoad(): void;
|
|
34
64
|
syncSelectedItemFromItems(items: SulaMenuMainItem[]): void;
|
|
35
65
|
getVisibleItems<T extends SulaMenuItem>(items?: T[]): T[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SulaMenuMainItem } from './model/sula-menu.model';
|
|
1
|
+
import { SulaMenuDensity, SulaMenuLabelOverflow, SulaMenuMainItem } from './model/sula-menu.model';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
4
|
tags: string[];
|
|
@@ -19,6 +19,44 @@ declare const _default: {
|
|
|
19
19
|
required: boolean;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
width: {
|
|
23
|
+
control: string;
|
|
24
|
+
defaultValue: string;
|
|
25
|
+
description: string;
|
|
26
|
+
type: {
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
density: {
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
options: SulaMenuDensity[];
|
|
35
|
+
description: string;
|
|
36
|
+
table: {
|
|
37
|
+
type: {
|
|
38
|
+
summary: string;
|
|
39
|
+
};
|
|
40
|
+
defaultValue: {
|
|
41
|
+
summary: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
labelOverflow: {
|
|
46
|
+
control: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
options: SulaMenuLabelOverflow[];
|
|
50
|
+
description: string;
|
|
51
|
+
table: {
|
|
52
|
+
type: {
|
|
53
|
+
summary: string;
|
|
54
|
+
};
|
|
55
|
+
defaultValue: {
|
|
56
|
+
summary: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
22
60
|
items: {
|
|
23
61
|
control: string;
|
|
24
62
|
defaultValue: SulaMenuMainItem[];
|
|
@@ -52,5 +90,8 @@ export default _default;
|
|
|
52
90
|
export declare const Default: any;
|
|
53
91
|
export declare const WithNestedNavigation: any;
|
|
54
92
|
export declare const WithLongLabels: any;
|
|
93
|
+
export declare const WithTruncatedLongLabels: any;
|
|
94
|
+
export declare const WithLongLabelsCustomLayout: any;
|
|
95
|
+
export declare const WithComfortableDensity: any;
|
|
55
96
|
export declare const WithHiddenItems: any;
|
|
56
97
|
export declare const WithoutBrandImage: any;
|
|
@@ -73,6 +73,7 @@ export declare class SulaModal {
|
|
|
73
73
|
isListOrCustomFull(): boolean;
|
|
74
74
|
isSideModal(): boolean;
|
|
75
75
|
isPromoOrSpecialSide(): boolean;
|
|
76
|
+
hasHeaderIcon(): boolean;
|
|
76
77
|
hasSlotContent(): boolean;
|
|
77
78
|
hasButtons(): boolean;
|
|
78
79
|
getOverlayClasses(): Record<string, boolean>;
|
|
@@ -15,7 +15,7 @@ import { SulaMenuListItem } from "./components/sula-menu-select-list/model/sula-
|
|
|
15
15
|
import { SulaMenuListItem as SulaMenuListItem1 } from "./components";
|
|
16
16
|
import { SulaIconPickerIcon } from "./components/sula-icon-picker/model/sula-icon-picker.model";
|
|
17
17
|
import { SulaLoaderSize } from "./components/sula-loader/model/sula-loader.model";
|
|
18
|
-
import { SulaMenuItem, SulaMenuMainItem, SulaMenuSubItem } from "./components/sula-menu/model/sula-menu.model";
|
|
18
|
+
import { SulaMenuDensity, SulaMenuItem, SulaMenuLabelOverflow, SulaMenuMainItem, SulaMenuSubItem } from "./components/sula-menu/model/sula-menu.model";
|
|
19
19
|
import { SulaModalSlotOverflow, SulaModalType } from "./components/sula-modal/model/sula-modal.model";
|
|
20
20
|
import { SulaProgressBarAppearance, SulaProgressBarState } from "./components/sula-progress-bar/model/sula-progress-bar.model";
|
|
21
21
|
import { SulaSearchBarStyle } from "./components/sula-search-bar/model/sula-search.bar-model";
|
|
@@ -39,7 +39,7 @@ export { SulaMenuListItem } from "./components/sula-menu-select-list/model/sula-
|
|
|
39
39
|
export { SulaMenuListItem as SulaMenuListItem1 } from "./components";
|
|
40
40
|
export { SulaIconPickerIcon } from "./components/sula-icon-picker/model/sula-icon-picker.model";
|
|
41
41
|
export { SulaLoaderSize } from "./components/sula-loader/model/sula-loader.model";
|
|
42
|
-
export { SulaMenuItem, SulaMenuMainItem, SulaMenuSubItem } from "./components/sula-menu/model/sula-menu.model";
|
|
42
|
+
export { SulaMenuDensity, SulaMenuItem, SulaMenuLabelOverflow, SulaMenuMainItem, SulaMenuSubItem } from "./components/sula-menu/model/sula-menu.model";
|
|
43
43
|
export { SulaModalSlotOverflow, SulaModalType } from "./components/sula-modal/model/sula-modal.model";
|
|
44
44
|
export { SulaProgressBarAppearance, SulaProgressBarState } from "./components/sula-progress-bar/model/sula-progress-bar.model";
|
|
45
45
|
export { SulaSearchBarStyle } from "./components/sula-search-bar/model/sula-search.bar-model";
|
|
@@ -331,7 +331,21 @@ export namespace Components {
|
|
|
331
331
|
*/
|
|
332
332
|
"size": SulaLoaderSize;
|
|
333
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Hierarchical navigation menu with collapsible and preview states.
|
|
336
|
+
* @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.
|
|
337
|
+
* @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.
|
|
338
|
+
* @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.
|
|
339
|
+
* @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.
|
|
340
|
+
* @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.
|
|
341
|
+
* @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.
|
|
342
|
+
*/
|
|
334
343
|
interface SulaMenu {
|
|
344
|
+
/**
|
|
345
|
+
* Density applied to top-level menu items.
|
|
346
|
+
* @default SulaMenuDensity.Default
|
|
347
|
+
*/
|
|
348
|
+
"density": SulaMenuDensity;
|
|
335
349
|
/**
|
|
336
350
|
* Menu image
|
|
337
351
|
* @default ''
|
|
@@ -342,11 +356,21 @@ export namespace Components {
|
|
|
342
356
|
* @default []
|
|
343
357
|
*/
|
|
344
358
|
"items": SulaMenuMainItem[];
|
|
359
|
+
/**
|
|
360
|
+
* Overflow behavior for top-level item labels. Wrap displays up to two lines by default; the limit can be customized with --sula-menu-main-item-max-lines.
|
|
361
|
+
* @default SulaMenuLabelOverflow.Wrap
|
|
362
|
+
*/
|
|
363
|
+
"labelOverflow": SulaMenuLabelOverflow;
|
|
345
364
|
/**
|
|
346
365
|
* Menu title
|
|
347
366
|
* @default ''
|
|
348
367
|
*/
|
|
349
368
|
"menuTitle": string;
|
|
369
|
+
/**
|
|
370
|
+
* Menu width in expanded state. Use a CSS length that does not depend on the host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).
|
|
371
|
+
* @default ''
|
|
372
|
+
*/
|
|
373
|
+
"width": string;
|
|
350
374
|
}
|
|
351
375
|
interface SulaMenuSelectList {
|
|
352
376
|
/**
|
|
@@ -996,6 +1020,15 @@ declare global {
|
|
|
996
1020
|
"itemClicked": SulaMenuMainItem | SulaMenuSubItem | SulaMenuItem;
|
|
997
1021
|
"menuToggled": boolean;
|
|
998
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Hierarchical navigation menu with collapsible and preview states.
|
|
1025
|
+
* @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.
|
|
1026
|
+
* @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.
|
|
1027
|
+
* @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.
|
|
1028
|
+
* @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.
|
|
1029
|
+
* @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.
|
|
1030
|
+
* @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.
|
|
1031
|
+
*/
|
|
999
1032
|
interface HTMLSulaMenuElement extends Components.SulaMenu, HTMLStencilElement {
|
|
1000
1033
|
addEventListener<K extends keyof HTMLSulaMenuElementEventMap>(type: K, listener: (this: HTMLSulaMenuElement, ev: SulaMenuCustomEvent<HTMLSulaMenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1001
1034
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1640,7 +1673,21 @@ declare namespace LocalJSX {
|
|
|
1640
1673
|
*/
|
|
1641
1674
|
"size"?: SulaLoaderSize;
|
|
1642
1675
|
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Hierarchical navigation menu with collapsible and preview states.
|
|
1678
|
+
* @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.
|
|
1679
|
+
* @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.
|
|
1680
|
+
* @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.
|
|
1681
|
+
* @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.
|
|
1682
|
+
* @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.
|
|
1683
|
+
* @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.
|
|
1684
|
+
*/
|
|
1643
1685
|
interface SulaMenu {
|
|
1686
|
+
/**
|
|
1687
|
+
* Density applied to top-level menu items.
|
|
1688
|
+
* @default SulaMenuDensity.Default
|
|
1689
|
+
*/
|
|
1690
|
+
"density"?: SulaMenuDensity;
|
|
1644
1691
|
/**
|
|
1645
1692
|
* Menu image
|
|
1646
1693
|
* @default ''
|
|
@@ -1651,6 +1698,11 @@ declare namespace LocalJSX {
|
|
|
1651
1698
|
* @default []
|
|
1652
1699
|
*/
|
|
1653
1700
|
"items"?: SulaMenuMainItem[];
|
|
1701
|
+
/**
|
|
1702
|
+
* Overflow behavior for top-level item labels. Wrap displays up to two lines by default; the limit can be customized with --sula-menu-main-item-max-lines.
|
|
1703
|
+
* @default SulaMenuLabelOverflow.Wrap
|
|
1704
|
+
*/
|
|
1705
|
+
"labelOverflow"?: SulaMenuLabelOverflow;
|
|
1654
1706
|
/**
|
|
1655
1707
|
* Menu title
|
|
1656
1708
|
* @default ''
|
|
@@ -1668,6 +1720,11 @@ declare namespace LocalJSX {
|
|
|
1668
1720
|
* Emitted when the menu is toggled between collapsed and expanded states True: Menu is expanded False: Menu is collapsed
|
|
1669
1721
|
*/
|
|
1670
1722
|
"onMenuToggled"?: (event: SulaMenuCustomEvent<boolean>) => void;
|
|
1723
|
+
/**
|
|
1724
|
+
* Menu width in expanded state. Use a CSS length that does not depend on the host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).
|
|
1725
|
+
* @default ''
|
|
1726
|
+
*/
|
|
1727
|
+
"width"?: string;
|
|
1671
1728
|
}
|
|
1672
1729
|
interface SulaMenuSelectList {
|
|
1673
1730
|
/**
|
|
@@ -2261,6 +2318,15 @@ declare module "@stencil/core" {
|
|
|
2261
2318
|
"sula-icon": LocalJSX.SulaIcon & JSXBase.HTMLAttributes<HTMLSulaIconElement>;
|
|
2262
2319
|
"sula-icon-picker": LocalJSX.SulaIconPicker & JSXBase.HTMLAttributes<HTMLSulaIconPickerElement>;
|
|
2263
2320
|
"sula-loader": LocalJSX.SulaLoader & JSXBase.HTMLAttributes<HTMLSulaLoaderElement>;
|
|
2321
|
+
/**
|
|
2322
|
+
* Hierarchical navigation menu with collapsible and preview states.
|
|
2323
|
+
* @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.
|
|
2324
|
+
* @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.
|
|
2325
|
+
* @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.
|
|
2326
|
+
* @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.
|
|
2327
|
+
* @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.
|
|
2328
|
+
* @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.
|
|
2329
|
+
*/
|
|
2264
2330
|
"sula-menu": LocalJSX.SulaMenu & JSXBase.HTMLAttributes<HTMLSulaMenuElement>;
|
|
2265
2331
|
"sula-menu-select-list": LocalJSX.SulaMenuSelectList & JSXBase.HTMLAttributes<HTMLSulaMenuSelectListElement>;
|
|
2266
2332
|
"sula-modal": LocalJSX.SulaModal & JSXBase.HTMLAttributes<HTMLSulaModalElement>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
* to consume components of this package as outlined in the `README.md`.
|
|
9
9
|
*/
|
|
10
10
|
export type * from './components.d.ts';
|
|
11
|
+
export { SulaMenuDensity, SulaMenuLabelOverflow } from './components/sula-menu/model/sula-menu.model';
|
|
11
12
|
export type { SulaToggleEvent } from './components/sula-toggle/model/sula-toggle.model';
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
var t;
|
|
2
|
+
|
|
3
|
+
(function(t) {
|
|
4
|
+
t["Compact"] = "compact";
|
|
5
|
+
t["Default"] = "default";
|
|
6
|
+
t["Comfortable"] = "comfortable";
|
|
7
|
+
})(t || (t = {}));
|
|
8
|
+
|
|
9
|
+
var a;
|
|
2
10
|
|
|
11
|
+
(function(t) {
|
|
12
|
+
t["Truncate"] = "truncate";
|
|
13
|
+
t["Wrap"] = "wrap";
|
|
14
|
+
})(a || (a = {}));
|
|
15
|
+
|
|
16
|
+
export { t as SulaMenuDensity, a as SulaMenuLabelOverflow };
|
|
17
|
+
//# sourceMappingURL=index.esm.js.map
|
|
3
18
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["src/components/sula-menu/model/sula-menu.model.ts"],"sourcesContent":["export enum SulaMenuDensity {\n Compact = 'compact',\n Default = 'default',\n Comfortable = 'comfortable',\n}\n\nexport enum SulaMenuLabelOverflow {\n Truncate = 'truncate',\n Wrap = 'wrap',\n}\n\nexport interface SulaMenuMainItem extends SulaMenuItem {\n children?: SulaMenuSubItem[];\n}\n\nexport interface SulaMenuSubItem extends SulaMenuItem {\n children?: SulaMenuItem[];\n}\n\nexport interface SulaMenuItem {\n id: string;\n label: string;\n icon: string;\n hidden?: boolean;\n open?: boolean;\n route?: string;\n expanded?: boolean;\n selected?: boolean;\n}\n\nexport type SelectedMenuItem = {\n id: string;\n parentItemId?: string;\n parentChildId?: string;\n};\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAJW,eAAe,KAAf,eAAe,GAI1B,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;"}
|