@sula-tech/webcomponents 0.13.0 → 0.14.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/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_21.cjs.entry.js +34 -21
- package/dist/cjs/sula-avatar_21.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +113 -22
- package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +145 -0
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -1
- package/dist/components/sula-dropdown.js +39 -23
- package/dist/components/sula-dropdown.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_21.entry.js +34 -21
- package/dist/esm/sula-avatar_21.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +17 -2
- package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +35 -0
- package/dist/types/components.d.ts +38 -0
- package/dist/webcomponents/{p-f1a4d84f.entry.js → p-a7141407.entry.js} +44 -28
- package/dist/webcomponents/p-a7141407.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +6 -3
- package/package.json +1 -1
- package/dist/webcomponents/p-f1a4d84f.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_21",[[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-dropdown",{"label":[1025],"disabled":[1028],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"
|
|
19
|
+
return bootstrapLazy([["sula-avatar_21",[[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-dropdown",{"label":[1025],"disabled":[1028],"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-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-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-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-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-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]}],[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-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
|
|
|
@@ -25,6 +25,22 @@ export declare class SulaDropdown {
|
|
|
25
25
|
* Maximum height for dropdown menu in pixels
|
|
26
26
|
*/
|
|
27
27
|
menuMaxHeight: number;
|
|
28
|
+
/**
|
|
29
|
+
* Maximum height for custom content area in pixels
|
|
30
|
+
*/
|
|
31
|
+
contentMaxHeight: number;
|
|
32
|
+
/**
|
|
33
|
+
* Enable custom content via slot instead of items list
|
|
34
|
+
*/
|
|
35
|
+
customContent?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Close dropdown when an item is selected or content is clicked
|
|
38
|
+
*/
|
|
39
|
+
closeOnSelect: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Show or hide dropdown content
|
|
42
|
+
*/
|
|
43
|
+
showContent: boolean;
|
|
28
44
|
/**
|
|
29
45
|
* Event emitted when dropdown is clicked
|
|
30
46
|
*/
|
|
@@ -42,7 +58,6 @@ export declare class SulaDropdown {
|
|
|
42
58
|
*/
|
|
43
59
|
menuItemSelected: EventEmitter<SulaMenuListItem>;
|
|
44
60
|
selectedItem?: SulaMenuListItem;
|
|
45
|
-
showItems: boolean;
|
|
46
61
|
isFocused: boolean;
|
|
47
62
|
searchTerm: string;
|
|
48
63
|
filteredItems: SulaMenuListItem[];
|
|
@@ -50,7 +65,7 @@ export declare class SulaDropdown {
|
|
|
50
65
|
node?: HTMLElement;
|
|
51
66
|
searchInputRef?: HTMLInputElement;
|
|
52
67
|
handleValueChange(): void;
|
|
53
|
-
|
|
68
|
+
handleShowContentChange(newValue: boolean): void;
|
|
54
69
|
handleDocumentClick(event: Event): void;
|
|
55
70
|
handleWindowResize(): void;
|
|
56
71
|
calculateMenuPosition(): void;
|
|
@@ -50,6 +50,38 @@ declare const _default: {
|
|
|
50
50
|
required: boolean;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
customContent: {
|
|
54
|
+
control: string;
|
|
55
|
+
defaultValue: boolean;
|
|
56
|
+
description: string;
|
|
57
|
+
type: {
|
|
58
|
+
required: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
contentMaxHeight: {
|
|
62
|
+
control: string;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
description: string;
|
|
65
|
+
type: {
|
|
66
|
+
required: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
closeOnSelect: {
|
|
70
|
+
control: string;
|
|
71
|
+
defaultValue: boolean;
|
|
72
|
+
description: string;
|
|
73
|
+
type: {
|
|
74
|
+
required: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
showContent: {
|
|
78
|
+
control: string;
|
|
79
|
+
defaultValue: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
type: {
|
|
82
|
+
required: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
53
85
|
dropdownClicked: {
|
|
54
86
|
action: string;
|
|
55
87
|
description: string;
|
|
@@ -85,3 +117,6 @@ export declare const LongItemsList: any;
|
|
|
85
117
|
export declare const Searchable: any;
|
|
86
118
|
export declare const SearchableWithSelectedValue: any;
|
|
87
119
|
export declare const AutoPositioning: any;
|
|
120
|
+
export declare const CustomContent: any;
|
|
121
|
+
export declare const CustomContentPersistent: any;
|
|
122
|
+
export declare const CustomContentWithCheckboxes: any;
|
|
@@ -203,6 +203,20 @@ export namespace Components {
|
|
|
203
203
|
"text": string;
|
|
204
204
|
}
|
|
205
205
|
interface SulaDropdown {
|
|
206
|
+
/**
|
|
207
|
+
* Close dropdown when an item is selected or content is clicked
|
|
208
|
+
* @default true
|
|
209
|
+
*/
|
|
210
|
+
"closeOnSelect": boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Maximum height for custom content area in pixels
|
|
213
|
+
* @default 260
|
|
214
|
+
*/
|
|
215
|
+
"contentMaxHeight": number;
|
|
216
|
+
/**
|
|
217
|
+
* Enable custom content via slot instead of items list
|
|
218
|
+
*/
|
|
219
|
+
"customContent"?: boolean;
|
|
206
220
|
/**
|
|
207
221
|
* Dropdown is disabled
|
|
208
222
|
* @default false
|
|
@@ -226,6 +240,11 @@ export namespace Components {
|
|
|
226
240
|
* Enable search/filter functionality in dropdown
|
|
227
241
|
*/
|
|
228
242
|
"searchable"?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Show or hide dropdown content
|
|
245
|
+
* @default false
|
|
246
|
+
*/
|
|
247
|
+
"showContent": boolean;
|
|
229
248
|
/**
|
|
230
249
|
* Value for dropdown
|
|
231
250
|
*/
|
|
@@ -1196,6 +1215,20 @@ declare namespace LocalJSX {
|
|
|
1196
1215
|
"text"?: string;
|
|
1197
1216
|
}
|
|
1198
1217
|
interface SulaDropdown {
|
|
1218
|
+
/**
|
|
1219
|
+
* Close dropdown when an item is selected or content is clicked
|
|
1220
|
+
* @default true
|
|
1221
|
+
*/
|
|
1222
|
+
"closeOnSelect"?: boolean;
|
|
1223
|
+
/**
|
|
1224
|
+
* Maximum height for custom content area in pixels
|
|
1225
|
+
* @default 260
|
|
1226
|
+
*/
|
|
1227
|
+
"contentMaxHeight"?: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* Enable custom content via slot instead of items list
|
|
1230
|
+
*/
|
|
1231
|
+
"customContent"?: boolean;
|
|
1199
1232
|
/**
|
|
1200
1233
|
* Dropdown is disabled
|
|
1201
1234
|
* @default false
|
|
@@ -1235,6 +1268,11 @@ declare namespace LocalJSX {
|
|
|
1235
1268
|
* Enable search/filter functionality in dropdown
|
|
1236
1269
|
*/
|
|
1237
1270
|
"searchable"?: boolean;
|
|
1271
|
+
/**
|
|
1272
|
+
* Show or hide dropdown content
|
|
1273
|
+
* @default false
|
|
1274
|
+
*/
|
|
1275
|
+
"showContent"?: boolean;
|
|
1238
1276
|
/**
|
|
1239
1277
|
* Value for dropdown
|
|
1240
1278
|
*/
|
|
@@ -710,7 +710,7 @@ const SulaChip = class {
|
|
|
710
710
|
|
|
711
711
|
SulaChip.style = sulaChipCss;
|
|
712
712
|
|
|
713
|
-
const sulaDropdownCss = '*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.outline{outline-style:solid}:host{display:block}.dropdown-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-\\[72px\\]{bottom:72px}.left-0{left:0}.top-\\[72px\\]{top:72px}.z-50{z-index:50}.m-0{margin:0}.ml-8{margin-left:.5rem}.flex{display:flex}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm,.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-none{border-style:none}.border-line-general{border-color:var(--color-line-general)}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-transparent{background-color:transparent}.p-0{padding:0}.px-16{padding-left:1rem;padding-right:1rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-bottom:1rem;padding-top:1rem}.pt-4{padding-top:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.text-icon-disabled{color:var(--color-icon-disabled)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\\:text-text-secondary::placeholder{color:var(--color-text-secondary)}.overflow-auto{overflow:auto}.rounded-sm{border-radius:.75rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.text-text-brand{color:var(--color-text-brand)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}';
|
|
713
|
+
const sulaDropdownCss = '*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.outline{outline-style:solid}:host{display:block}.dropdown-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-\\[72px\\]{bottom:72px}.left-0{left:0}.top-\\[72px\\]{top:72px}.z-50{z-index:50}.m-0{margin:0}.ml-8{margin-left:.5rem}.flex{display:flex}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.rounded-sm,.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-none{border-style:none}.border-line-general{border-color:var(--color-line-general)}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-transparent{background-color:transparent}.p-0{padding:0}.px-16{padding-left:1rem;padding-right:1rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-bottom:1rem;padding-top:1rem}.pt-4{padding-top:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.text-icon-disabled{color:var(--color-icon-disabled)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\\:text-text-secondary::placeholder{color:var(--color-text-secondary)}.rounded-sm{border-radius:.75rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.text-text-brand{color:var(--color-text-brand)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}';
|
|
714
714
|
|
|
715
715
|
const SulaDropdown = class {
|
|
716
716
|
constructor(e) {
|
|
@@ -728,7 +728,15 @@ const SulaDropdown = class {
|
|
|
728
728
|
/**
|
|
729
729
|
* Maximum height for dropdown menu in pixels
|
|
730
730
|
*/ this.menuMaxHeight = 260;
|
|
731
|
-
|
|
731
|
+
/**
|
|
732
|
+
* Maximum height for custom content area in pixels
|
|
733
|
+
*/ this.contentMaxHeight = 260;
|
|
734
|
+
/**
|
|
735
|
+
* Close dropdown when an item is selected or content is clicked
|
|
736
|
+
*/ this.closeOnSelect = true;
|
|
737
|
+
/**
|
|
738
|
+
* Show or hide dropdown content
|
|
739
|
+
*/ this.showContent = false;
|
|
732
740
|
this.isFocused = false;
|
|
733
741
|
this.searchTerm = "";
|
|
734
742
|
this.filteredItems = [];
|
|
@@ -736,10 +744,10 @@ const SulaDropdown = class {
|
|
|
736
744
|
this.handleClick = () => {
|
|
737
745
|
if (this.disabled) return;
|
|
738
746
|
this.dropdownClicked.emit();
|
|
739
|
-
if (this.items.length > 0) {
|
|
740
|
-
this.
|
|
747
|
+
if (this.customContent || this.items.length > 0) {
|
|
748
|
+
this.showContent = !this.showContent;
|
|
741
749
|
}
|
|
742
|
-
if (this.searchable && this.
|
|
750
|
+
if (this.searchable && this.showContent && this.searchInputRef) {
|
|
743
751
|
this.searchInputRef.focus();
|
|
744
752
|
}
|
|
745
753
|
};
|
|
@@ -747,9 +755,11 @@ const SulaDropdown = class {
|
|
|
747
755
|
this.selectedItem = e.detail;
|
|
748
756
|
this.searchTerm = "";
|
|
749
757
|
this.menuItemSelected.emit(e.detail);
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
758
|
+
if (this.closeOnSelect) {
|
|
759
|
+
setTimeout((() => {
|
|
760
|
+
this.showContent = false;
|
|
761
|
+
}), 0);
|
|
762
|
+
}
|
|
753
763
|
};
|
|
754
764
|
this.filterItems = () => {
|
|
755
765
|
if (!this.searchTerm.trim()) {
|
|
@@ -779,7 +789,7 @@ const SulaDropdown = class {
|
|
|
779
789
|
this.selectedItem = this.value;
|
|
780
790
|
}
|
|
781
791
|
}
|
|
782
|
-
|
|
792
|
+
handleShowContentChange(e) {
|
|
783
793
|
if (!e) {
|
|
784
794
|
this.searchTerm = "";
|
|
785
795
|
this.filteredItems = [];
|
|
@@ -790,11 +800,11 @@ const SulaDropdown = class {
|
|
|
790
800
|
const t = e.composedPath();
|
|
791
801
|
const o = t.some((e => e === this.node));
|
|
792
802
|
if (!o) {
|
|
793
|
-
this.
|
|
803
|
+
this.showContent = false;
|
|
794
804
|
}
|
|
795
805
|
}
|
|
796
806
|
handleWindowResize() {
|
|
797
|
-
if (this.
|
|
807
|
+
if (this.showContent) {
|
|
798
808
|
this.calculateMenuPosition();
|
|
799
809
|
}
|
|
800
810
|
}
|
|
@@ -805,7 +815,7 @@ const SulaDropdown = class {
|
|
|
805
815
|
const o = t - e.bottom;
|
|
806
816
|
const r = e.top;
|
|
807
817
|
const n = 60;
|
|
808
|
-
const a = this.menuMaxHeight + n;
|
|
818
|
+
const a = (this.customContent ? this.contentMaxHeight : this.menuMaxHeight) + n;
|
|
809
819
|
this.openUpward = o < a && (r > a || r > o);
|
|
810
820
|
}
|
|
811
821
|
componentWillLoad() {
|
|
@@ -814,7 +824,7 @@ const SulaDropdown = class {
|
|
|
814
824
|
}
|
|
815
825
|
}
|
|
816
826
|
componentDidRender() {
|
|
817
|
-
if (this.
|
|
827
|
+
if (this.showContent) {
|
|
818
828
|
this.calculateMenuPosition();
|
|
819
829
|
if (this.searchable && this.searchInputRef) {
|
|
820
830
|
this.searchInputRef.focus();
|
|
@@ -828,10 +838,10 @@ const SulaDropdown = class {
|
|
|
828
838
|
render() {
|
|
829
839
|
var e;
|
|
830
840
|
return h$1(Host, {
|
|
831
|
-
key: "
|
|
841
|
+
key: "812029af9121bf2f6b10b426b93dc0095796d66d",
|
|
832
842
|
ref: e => this.node = e
|
|
833
843
|
}, h$1("div", {
|
|
834
|
-
key: "
|
|
844
|
+
key: "24e4b075470cd3ac8311374d0eebbc9d62bc248e",
|
|
835
845
|
class: {
|
|
836
846
|
"flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative": true,
|
|
837
847
|
"bg-surface-body cursor-pointer": !this.disabled,
|
|
@@ -843,17 +853,17 @@ const SulaDropdown = class {
|
|
|
843
853
|
onFocus: this.handleFocus,
|
|
844
854
|
onBlur: this.handleBlur
|
|
845
855
|
}, h$1("div", {
|
|
846
|
-
key: "
|
|
856
|
+
key: "10bb402bb063b83a66996c3b21e345045779fea6",
|
|
847
857
|
class: "flex flex-col w-full"
|
|
848
858
|
}, h$1("label", {
|
|
849
|
-
key: "
|
|
859
|
+
key: "9e6013e76bd927d9cf50bccfe542205b2db5ad3c",
|
|
850
860
|
class: {
|
|
851
|
-
"text-base leading-4": !this.selectedItem && !(this.searchable && this.
|
|
852
|
-
"text-sm leading-4 font-bold": !!this.selectedItem || this.searchable && this.
|
|
861
|
+
"text-base leading-4": !this.selectedItem && !(this.searchable && this.showContent),
|
|
862
|
+
"text-sm leading-4 font-bold": !!this.selectedItem || this.searchable && this.showContent,
|
|
853
863
|
"text-text-primary": !this.disabled,
|
|
854
864
|
"text-text-disabled": this.disabled
|
|
855
865
|
}
|
|
856
|
-
}, this.label), this.searchable && this.
|
|
866
|
+
}, this.label), this.searchable && this.showContent ? h$1("input", {
|
|
857
867
|
ref: e => this.searchInputRef = e,
|
|
858
868
|
type: "text",
|
|
859
869
|
value: this.searchTerm,
|
|
@@ -867,20 +877,26 @@ const SulaDropdown = class {
|
|
|
867
877
|
"text-text-disabled": this.disabled
|
|
868
878
|
}
|
|
869
879
|
}, this.selectedItem.title)), h$1("div", {
|
|
870
|
-
key: "
|
|
880
|
+
key: "9c570fe666a9e400882728dd6cc7375efc6fd9c3",
|
|
871
881
|
class: "flex items-center justify-center ml-8 leading-6 text-2xl"
|
|
872
882
|
}, h$1("sula-icon", {
|
|
873
|
-
key: "
|
|
874
|
-
icon: `ph ph-caret-${this.
|
|
883
|
+
key: "c33165aec78c9d227a645d5a5390caa5f5580e48",
|
|
884
|
+
icon: `ph ph-caret-${this.showContent ? "up" : "down"}`,
|
|
875
885
|
customClass: `${this.getIconClass()} text-2xl`
|
|
876
|
-
})), this.
|
|
877
|
-
key: "
|
|
886
|
+
})), this.showContent && h$1("div", {
|
|
887
|
+
key: "a5f4c9c26cfc64bb39300474e8efb52174b538ab",
|
|
878
888
|
class: {
|
|
879
889
|
"absolute z-50 left-0 w-full transition-all duration-200 ease-in-out": true,
|
|
880
890
|
"bottom-[72px]": this.openUpward,
|
|
881
891
|
"top-[72px]": !this.openUpward
|
|
892
|
+
},
|
|
893
|
+
onClick: !this.closeOnSelect ? e => e.stopPropagation() : undefined
|
|
894
|
+
}, this.customContent ? h$1("div", {
|
|
895
|
+
class: "bg-surface-body border border-line-general rounded-sm overflow-auto",
|
|
896
|
+
style: {
|
|
897
|
+
maxHeight: `${this.contentMaxHeight}px`
|
|
882
898
|
}
|
|
883
|
-
}, (() => {
|
|
899
|
+
}, h$1("slot", null)) : (() => {
|
|
884
900
|
const e = this.searchable && this.searchTerm.trim() ? this.filteredItems : this.items;
|
|
885
901
|
const t = this.searchable && this.searchTerm.trim() && e.length === 0;
|
|
886
902
|
if (t) {
|
|
@@ -900,7 +916,7 @@ const SulaDropdown = class {
|
|
|
900
916
|
static get watchers() {
|
|
901
917
|
return {
|
|
902
918
|
value: [ "handleValueChange" ],
|
|
903
|
-
|
|
919
|
+
showContent: [ "handleShowContentChange" ]
|
|
904
920
|
};
|
|
905
921
|
}
|
|
906
922
|
};
|
|
@@ -23068,4 +23084,4 @@ SulaTimelineList.style = sulaTimelineListCss;
|
|
|
23068
23084
|
|
|
23069
23085
|
export { SulaAvatar as sula_avatar, SulaBadge as sula_badge, SulaBreadcrumb as sula_breadcrumb, SulaButton as sula_button, SulaCheckbox as sula_checkbox, SulaChip as sula_chip, SulaDropdown as sula_dropdown, SulaIcon as sula_icon, SulaLoader as sula_loader, SulaMenuSelectList as sula_menu_select_list, SulaModal as sula_modal, SulaProgressBar as sula_progress_bar, SulaRadioButton as sula_radio_button, SulaSearchBar as sula_search_bar, SulaSegmentedControl as sula_segmented_control, SulaSwitch as sula_switch, SulaTag as sula_tag, SulaTextarea as sula_textarea, SulaTextfield as sula_textfield, SulaTiles as sula_tiles, SulaTimelineList as sula_timeline_list };
|
|
23070
23086
|
//# sourceMappingURL=sula-avatar.sula-badge.sula-breadcrumb.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-modal.sula-progress-bar.sula-radio-button.sula-search-bar.sula-segmented-control.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.esm.js.map
|
|
23071
|
-
//# sourceMappingURL=p-
|
|
23087
|
+
//# sourceMappingURL=p-a7141407.entry.js.map
|