@sula-tech/webcomponents 0.14.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.
@@ -18,7 +18,7 @@ var patchBrowser = () => {
18
18
 
19
19
  patchBrowser().then(async (options) => {
20
20
  await index.globalScripts();
21
- return index.bootstrapLazy([["sula-avatar_21.cjs",[[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"],"selectedItem":[32],"showItems":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showItems":["handleShowItemsChange"]}],[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);
21
+ return index.bootstrapLazy([["sula-avatar_21.cjs",[[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);
22
22
  });
23
23
 
24
24
  exports.setNonce = index.setNonce;
@@ -21,7 +21,10 @@ export class SulaDropdown {
21
21
  * Close dropdown when an item is selected or content is clicked
22
22
  */
23
23
  this.closeOnSelect = true;
24
- this.showItems = false;
24
+ /**
25
+ * Show or hide dropdown content
26
+ */
27
+ this.showContent = false;
25
28
  this.isFocused = false;
26
29
  this.searchTerm = '';
27
30
  this.filteredItems = [];
@@ -31,9 +34,9 @@ export class SulaDropdown {
31
34
  return;
32
35
  this.dropdownClicked.emit();
33
36
  if (this.customContent || this.items.length > 0) {
34
- this.showItems = !this.showItems;
37
+ this.showContent = !this.showContent;
35
38
  }
36
- if (this.searchable && this.showItems && this.searchInputRef) {
39
+ if (this.searchable && this.showContent && this.searchInputRef) {
37
40
  this.searchInputRef.focus();
38
41
  }
39
42
  };
@@ -43,7 +46,7 @@ export class SulaDropdown {
43
46
  this.menuItemSelected.emit(item.detail);
44
47
  if (this.closeOnSelect) {
45
48
  setTimeout(() => {
46
- this.showItems = false;
49
+ this.showContent = false;
47
50
  }, 0);
48
51
  }
49
52
  };
@@ -77,7 +80,7 @@ export class SulaDropdown {
77
80
  this.selectedItem = this.value;
78
81
  }
79
82
  }
80
- handleShowItemsChange(newValue) {
83
+ handleShowContentChange(newValue) {
81
84
  if (!newValue) {
82
85
  this.searchTerm = '';
83
86
  this.filteredItems = [];
@@ -89,11 +92,11 @@ export class SulaDropdown {
89
92
  const path = event.composedPath();
90
93
  const clickInside = path.some(el => el === this.node);
91
94
  if (!clickInside) {
92
- this.showItems = false;
95
+ this.showContent = false;
93
96
  }
94
97
  }
95
98
  handleWindowResize() {
96
- if (this.showItems) {
99
+ if (this.showContent) {
97
100
  this.calculateMenuPosition();
98
101
  }
99
102
  }
@@ -114,7 +117,7 @@ export class SulaDropdown {
114
117
  }
115
118
  }
116
119
  componentDidRender() {
117
- if (this.showItems) {
120
+ if (this.showContent) {
118
121
  this.calculateMenuPosition();
119
122
  if (this.searchable && this.searchInputRef) {
120
123
  this.searchInputRef.focus();
@@ -128,21 +131,21 @@ export class SulaDropdown {
128
131
  }
129
132
  render() {
130
133
  var _a;
131
- return (h(Host, { key: 'bcb9fc6510f1f67d054824aeb6d50502e20ab8d0', ref: node => (this.node = node) }, h("div", { key: 'a46d801d67e501faee720916fff32f37791b0ee9', class: {
134
+ return (h(Host, { key: '812029af9121bf2f6b10b426b93dc0095796d66d', ref: node => (this.node = node) }, h("div", { key: '24e4b075470cd3ac8311374d0eebbc9d62bc248e', class: {
132
135
  'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,
133
136
  'bg-surface-body cursor-pointer': !this.disabled,
134
137
  'bg-states-bg-disabled': this.disabled,
135
138
  'dropdown-focus': this.isFocused,
136
- }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'ef745b49c183c29d86fd50d3fa9d2084e75d8156', class: "flex flex-col w-full" }, h("label", { key: '833a6a1866ebc31842d746fd1beef1af7d368fed', class: {
137
- 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showItems),
138
- 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showItems),
139
+ }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '10bb402bb063b83a66996c3b21e345045779fea6', class: "flex flex-col w-full" }, h("label", { key: '9e6013e76bd927d9cf50bccfe542205b2db5ad3c', class: {
140
+ 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),
141
+ 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),
139
142
  'text-text-primary': !this.disabled,
140
143
  'text-text-disabled': this.disabled,
141
- } }, this.label), this.searchable && this.showItems ? (h("input", { ref: el => (this.searchInputRef = el), type: "text", value: this.searchTerm, onInput: this.handleSearchInput, placeholder: ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.title) || '', class: "w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4" })) : (!!this.selectedItem && (h("span", { class: {
144
+ } }, this.label), this.searchable && this.showContent ? (h("input", { ref: el => (this.searchInputRef = el), type: "text", value: this.searchTerm, onInput: this.handleSearchInput, placeholder: ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.title) || '', class: "w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4" })) : (!!this.selectedItem && (h("span", { class: {
142
145
  'text-base leading-4 pt-4': true,
143
146
  'text-text-primary': !this.disabled,
144
147
  'text-text-disabled': this.disabled,
145
- } }, this.selectedItem.title)))), h("div", { key: '1b8a1970c4750c3f314aa7d8e5193e8d9cfa3483', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: '635d6d6df91f4ea2d8d051ca7443941a44a7c856', icon: `ph ph-caret-${this.showItems ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showItems && (h("div", { key: '223e42138b156a98b1296e317599c2eb16e3a633', class: {
148
+ } }, this.selectedItem.title)))), h("div", { key: '9c570fe666a9e400882728dd6cc7375efc6fd9c3', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: 'c33165aec78c9d227a645d5a5390caa5f5580e48', icon: `ph ph-caret-${this.showContent ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showContent && (h("div", { key: 'a5f4c9c26cfc64bb39300474e8efb52174b538ab', class: {
146
149
  'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,
147
150
  'bottom-[72px]': this.openUpward,
148
151
  'top-[72px]': !this.openUpward,
@@ -354,13 +357,32 @@ export class SulaDropdown {
354
357
  "setter": false,
355
358
  "reflect": false,
356
359
  "defaultValue": "true"
360
+ },
361
+ "showContent": {
362
+ "type": "boolean",
363
+ "attribute": "show-content",
364
+ "mutable": true,
365
+ "complexType": {
366
+ "original": "boolean",
367
+ "resolved": "boolean",
368
+ "references": {}
369
+ },
370
+ "required": false,
371
+ "optional": false,
372
+ "docs": {
373
+ "tags": [],
374
+ "text": "Show or hide dropdown content"
375
+ },
376
+ "getter": false,
377
+ "setter": false,
378
+ "reflect": true,
379
+ "defaultValue": "false"
357
380
  }
358
381
  };
359
382
  }
360
383
  static get states() {
361
384
  return {
362
385
  "selectedItem": {},
363
- "showItems": {},
364
386
  "isFocused": {},
365
387
  "searchTerm": {},
366
388
  "filteredItems": {},
@@ -441,8 +463,8 @@ export class SulaDropdown {
441
463
  "propName": "value",
442
464
  "methodName": "handleValueChange"
443
465
  }, {
444
- "propName": "showItems",
445
- "methodName": "handleShowItemsChange"
466
+ "propName": "showContent",
467
+ "methodName": "handleShowContentChange"
446
468
  }];
447
469
  }
448
470
  static get listeners() {
@@ -1 +1 @@
1
- {"version":3,"file":"sula-dropdown.js","sourceRoot":"","sources":["../../../src/components/sula-dropdown/sula-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQpG,MAAM,OAAO,YAAY;IALzB;QAYE;;WAEG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;WAEG;QAEH,UAAK,GAAuB,EAAE,CAAC;QAc/B;;WAEG;QAEH,kBAAa,GAA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CAAC,CAAC,CAAC,GAAG,EAAE;oBACR,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;oBAChG,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;oBAE5F,IAAI,aAAa,EAAE,CAAC;wBAClB,OAAO,CACL,WAAK,KAAK,EAAC,iGAAiG,kCAEtG,CACP,CAAC;oBACJ,CAAC;oBAED,OAAO,CACL,6BACE,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,aAAa,EAAE,IAAI,CAAC,YAAY,EAChC,cAAc,EAAE,IAAI,CAAC,kBAAkB,GAChB,CAC1B,CAAC;gBACJ,CAAC,CAAC,EAAE,CACA,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaMenuListItem, SulaMenuSelectListCustomEvent } from '../../components';\n\n@Component({\n tag: 'sula-dropdown',\n styleUrl: 'sula-dropdown.scss',\n shadow: true,\n})\nexport class SulaDropdown {\n /**\n * Dropdown label\n */\n @Prop({ mutable: true })\n label: string;\n\n /**\n * Dropdown is disabled\n */\n @Prop({ mutable: true })\n disabled: boolean = false;\n\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Value for dropdown\n */\n @Prop({ mutable: true })\n value?: SulaMenuListItem;\n\n /**\n * Enable search/filter functionality in dropdown\n */\n @Prop({ reflect: true })\n searchable?: boolean;\n\n /**\n * Maximum height for dropdown menu in pixels\n */\n @Prop()\n menuMaxHeight: number = 260;\n\n /**\n * Maximum height for custom content area in pixels\n */\n @Prop()\n contentMaxHeight: number = 260;\n\n /**\n * Enable custom content via slot instead of items list\n */\n @Prop({ reflect: true })\n customContent?: boolean;\n\n /**\n * Close dropdown when an item is selected or content is clicked\n */\n @Prop()\n closeOnSelect: boolean = true;\n\n /**\n * Event emitted when dropdown is clicked\n */\n @Event()\n dropdownClicked: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused\n */\n @Event()\n dropdownFocused: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused out\n */\n @Event()\n dropdownFocusedOut: EventEmitter<void>;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n menuItemSelected: EventEmitter<SulaMenuListItem>;\n\n @State()\n selectedItem?: SulaMenuListItem;\n\n @State()\n showItems = false;\n\n @State()\n isFocused = false;\n\n @State()\n searchTerm: string = '';\n\n @State()\n filteredItems: SulaMenuListItem[] = [];\n\n @State()\n openUpward: boolean = false;\n\n node?: HTMLElement;\n searchInputRef?: HTMLInputElement;\n\n @Watch('value')\n handleValueChange() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n @Watch('showItems')\n handleShowItemsChange(newValue: boolean) {\n if (!newValue) {\n this.searchTerm = '';\n this.filteredItems = [];\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.node) return;\n\n const path = event.composedPath();\n const clickInside = path.some(el => el === this.node);\n\n if (!clickInside) {\n this.showItems = false;\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n if (this.showItems) {\n this.calculateMenuPosition();\n }\n }\n\n calculateMenuPosition() {\n if (!this.node) return;\n\n const rect = this.node.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n const buffer = 60; \n const requiredSpace = (this.customContent ? this.contentMaxHeight : this.menuMaxHeight) + buffer;\n\n this.openUpward = spaceBelow < requiredSpace && (spaceAbove > requiredSpace || spaceAbove > spaceBelow);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n componentDidRender() {\n if (this.showItems) {\n this.calculateMenuPosition();\n \n if (this.searchable && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n }\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.dropdownClicked.emit();\n\n if (this.customContent || this.items.length > 0) {\n this.showItems = !this.showItems;\n }\n\n if (this.searchable && this.showItems && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n };\n\n handleItemSelected = (item: SulaMenuSelectListCustomEvent<SulaMenuListItem>) => {\n this.selectedItem = item.detail;\n this.searchTerm = '';\n this.menuItemSelected.emit(item.detail);\n\n if (this.closeOnSelect) {\n setTimeout(() => {\n this.showItems = false;\n }, 0);\n }\n };\n\n filterItems = () => {\n if (!this.searchTerm.trim()) {\n return this.items;\n }\n const term = this.searchTerm.toLowerCase();\n return this.items.filter(item => item.title.toLowerCase().includes(term));\n };\n\n handleSearchInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.searchTerm = target.value;\n this.filteredItems = this.filterItems();\n };\n\n getIconClass() {\n if (this.disabled) return 'text-icon-disabled';\n\n return 'text-text-primary';\n }\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.isFocused = true;\n this.dropdownFocused.emit();\n };\n\n handleBlur = () => {\n if (this.disabled) return;\n\n this.isFocused = false;\n this.dropdownFocusedOut.emit();\n };\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div\n class={{\n 'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,\n 'bg-surface-body cursor-pointer': !this.disabled,\n 'bg-states-bg-disabled': this.disabled,\n 'dropdown-focus': this.isFocused,\n }}\n onClick={this.handleClick}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div class=\"flex flex-col w-full\">\n <label\n class={{\n 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showItems),\n 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showItems),\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.label}\n </label>\n\n {this.searchable && this.showItems ? (\n <input\n ref={el => (this.searchInputRef = el)}\n type=\"text\"\n value={this.searchTerm}\n onInput={this.handleSearchInput}\n placeholder={this.selectedItem?.title || ''}\n class=\"w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4\"\n />\n ) : (\n !!this.selectedItem && (\n <span\n class={{\n 'text-base leading-4 pt-4': true,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.selectedItem.title}\n </span>\n )\n )}\n </div>\n <div class=\"flex items-center justify-center ml-8 leading-6 text-2xl\">\n <sula-icon icon={`ph ph-caret-${this.showItems ? 'up' : 'down'}`} customClass={`${this.getIconClass()} text-2xl`}></sula-icon>\n </div>\n\n {this.showItems && (\n <div\n class={{\n 'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,\n 'bottom-[72px]': this.openUpward,\n 'top-[72px]': !this.openUpward,\n }}\n onClick={!this.closeOnSelect ? (e: Event) => e.stopPropagation() : undefined}\n >\n {this.customContent ? (\n <div class=\"bg-surface-body border border-line-general rounded-sm overflow-auto\" style={{ maxHeight: `${this.contentMaxHeight}px` }}>\n <slot></slot>\n </div>\n ) : (() => {\n const itemsToShow = this.searchable && this.searchTerm.trim() ? this.filteredItems : this.items;\n const showNoResults = this.searchable && this.searchTerm.trim() && itemsToShow.length === 0;\n\n if (showNoResults) {\n return (\n <div class=\"bg-surface-body border border-line-general rounded-sm py-16 px-24 text-base text-text-secondary\">\n Nenhum resultado encontrado\n </div>\n );\n }\n\n return (\n <sula-menu-select-list\n items={itemsToShow}\n fullWidth={true}\n maxHeight={this.menuMaxHeight}\n selectedValue={this.selectedItem}\n onItemSelected={this.handleItemSelected}\n ></sula-menu-select-list>\n );\n })()}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"sula-dropdown.js","sourceRoot":"","sources":["../../../src/components/sula-dropdown/sula-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQpG,MAAM,OAAO,YAAY;IALzB;QAYE;;WAEG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;WAEG;QAEH,UAAK,GAAuB,EAAE,CAAC;QAc/B;;WAEG;QAEH,kBAAa,GAAW,GAAG,CAAC;QAE5B;;WAEG;QAEH,qBAAgB,GAAW,GAAG,CAAC;QAQ/B;;WAEG;QAEH,kBAAa,GAAY,IAAI,CAAC;QAE9B;;WAEG;QAEH,gBAAW,GAAG,KAAK,CAAC;QA8BpB,cAAS,GAAG,KAAK,CAAC;QAGlB,eAAU,GAAW,EAAE,CAAC;QAGxB,kBAAa,GAAuB,EAAE,CAAC;QAGvC,eAAU,GAAY,KAAK,CAAC;QAoE5B,gBAAW,GAAG,GAAG,EAAE;YACjB,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;YAE5B,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;g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AE,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,aAAa,EAAE,IAAI,CAAC,YAAY,EAChC,cAAc,EAAE,IAAI,CAAC,kBAAkB,GAChB,CAC1B,CAAC;gBACJ,CAAC,CAAC,EAAE,CACA,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaMenuListItem, SulaMenuSelectListCustomEvent } from '../../components';\n\n@Component({\n tag: 'sula-dropdown',\n styleUrl: 'sula-dropdown.scss',\n shadow: true,\n})\nexport class SulaDropdown {\n /**\n * Dropdown label\n */\n @Prop({ mutable: true })\n label: string;\n\n /**\n * Dropdown is disabled\n */\n @Prop({ mutable: true })\n disabled: boolean = false;\n\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Value for dropdown\n */\n @Prop({ mutable: true })\n value?: SulaMenuListItem;\n\n /**\n * Enable search/filter functionality in dropdown\n */\n @Prop({ reflect: true })\n searchable?: boolean;\n\n /**\n * Maximum height for dropdown menu in pixels\n */\n @Prop()\n menuMaxHeight: number = 260;\n\n /**\n * Maximum height for custom content area in pixels\n */\n @Prop()\n contentMaxHeight: number = 260;\n\n /**\n * Enable custom content via slot instead of items list\n */\n @Prop({ reflect: true })\n customContent?: boolean;\n\n /**\n * Close dropdown when an item is selected or content is clicked\n */\n @Prop()\n closeOnSelect: boolean = true;\n\n /**\n * Show or hide dropdown content\n */\n @Prop({ mutable: true, reflect: true })\n showContent = false;\n \n /**\n * Event emitted when dropdown is clicked\n */\n @Event()\n dropdownClicked: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused\n */\n @Event()\n dropdownFocused: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused out\n */\n @Event()\n dropdownFocusedOut: EventEmitter<void>;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n menuItemSelected: EventEmitter<SulaMenuListItem>;\n\n @State()\n selectedItem?: SulaMenuListItem;\n\n @State()\n isFocused = false;\n\n @State()\n searchTerm: string = '';\n\n @State()\n filteredItems: SulaMenuListItem[] = [];\n\n @State()\n openUpward: boolean = false;\n\n node?: HTMLElement;\n searchInputRef?: HTMLInputElement;\n\n @Watch('value')\n handleValueChange() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n @Watch('showContent')\n handleShowContentChange(newValue: boolean) {\n if (!newValue) {\n this.searchTerm = '';\n this.filteredItems = [];\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.node) return;\n\n const path = event.composedPath();\n const clickInside = path.some(el => el === this.node);\n\n if (!clickInside) {\n this.showContent = false;\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n if (this.showContent) {\n this.calculateMenuPosition();\n }\n }\n\n calculateMenuPosition() {\n if (!this.node) return;\n\n const rect = this.node.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n const buffer = 60; \n const requiredSpace = (this.customContent ? this.contentMaxHeight : this.menuMaxHeight) + buffer;\n\n this.openUpward = spaceBelow < requiredSpace && (spaceAbove > requiredSpace || spaceAbove > spaceBelow);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n componentDidRender() {\n if (this.showContent) {\n this.calculateMenuPosition();\n \n if (this.searchable && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n }\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.dropdownClicked.emit();\n\n if (this.customContent || this.items.length > 0) {\n this.showContent = !this.showContent;\n }\n\n if (this.searchable && this.showContent && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n };\n\n handleItemSelected = (item: SulaMenuSelectListCustomEvent<SulaMenuListItem>) => {\n this.selectedItem = item.detail;\n this.searchTerm = '';\n this.menuItemSelected.emit(item.detail);\n\n if (this.closeOnSelect) {\n setTimeout(() => {\n this.showContent = false;\n }, 0);\n }\n };\n\n filterItems = () => {\n if (!this.searchTerm.trim()) {\n return this.items;\n }\n const term = this.searchTerm.toLowerCase();\n return this.items.filter(item => item.title.toLowerCase().includes(term));\n };\n\n handleSearchInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.searchTerm = target.value;\n this.filteredItems = this.filterItems();\n };\n\n getIconClass() {\n if (this.disabled) return 'text-icon-disabled';\n\n return 'text-text-primary';\n }\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.isFocused = true;\n this.dropdownFocused.emit();\n };\n\n handleBlur = () => {\n if (this.disabled) return;\n\n this.isFocused = false;\n this.dropdownFocusedOut.emit();\n };\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div\n class={{\n 'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,\n 'bg-surface-body cursor-pointer': !this.disabled,\n 'bg-states-bg-disabled': this.disabled,\n 'dropdown-focus': this.isFocused,\n }}\n onClick={this.handleClick}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div class=\"flex flex-col w-full\">\n <label\n class={{\n 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),\n 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.label}\n </label>\n\n {this.searchable && this.showContent ? (\n <input\n ref={el => (this.searchInputRef = el)}\n type=\"text\"\n value={this.searchTerm}\n onInput={this.handleSearchInput}\n placeholder={this.selectedItem?.title || ''}\n class=\"w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4\"\n />\n ) : (\n !!this.selectedItem && (\n <span\n class={{\n 'text-base leading-4 pt-4': true,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.selectedItem.title}\n </span>\n )\n )}\n </div>\n <div class=\"flex items-center justify-center ml-8 leading-6 text-2xl\">\n <sula-icon icon={`ph ph-caret-${this.showContent ? 'up' : 'down'}`} customClass={`${this.getIconClass()} text-2xl`}></sula-icon>\n </div>\n\n {this.showContent && (\n <div\n class={{\n 'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,\n 'bottom-[72px]': this.openUpward,\n 'top-[72px]': !this.openUpward,\n }}\n onClick={!this.closeOnSelect ? (e: Event) => e.stopPropagation() : undefined}\n >\n {this.customContent ? (\n <div class=\"bg-surface-body border border-line-general rounded-sm overflow-auto\" style={{ maxHeight: `${this.contentMaxHeight}px` }}>\n <slot></slot>\n </div>\n ) : (() => {\n const itemsToShow = this.searchable && this.searchTerm.trim() ? this.filteredItems : this.items;\n const showNoResults = this.searchable && this.searchTerm.trim() && itemsToShow.length === 0;\n\n if (showNoResults) {\n return (\n <div class=\"bg-surface-body border border-line-general rounded-sm py-16 px-24 text-base text-text-secondary\">\n Nenhum resultado encontrado\n </div>\n );\n }\n\n return (\n <sula-menu-select-list\n items={itemsToShow}\n fullWidth={true}\n maxHeight={this.menuMaxHeight}\n selectedValue={this.selectedItem}\n onItemSelected={this.handleItemSelected}\n ></sula-menu-select-list>\n );\n })()}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -74,6 +74,14 @@ export default {
74
74
  required: false,
75
75
  },
76
76
  },
77
+ showContent: {
78
+ control: 'boolean',
79
+ defaultValue: false,
80
+ description: 'Controla programaticamente a abertura/fechamento do dropdown',
81
+ type: {
82
+ required: false,
83
+ },
84
+ },
77
85
  dropdownClicked: {
78
86
  action: 'dropdownClicked',
79
87
  description: 'Evento emitido quando o dropdown é clicado',
@@ -115,6 +123,10 @@ const Template = args => {
115
123
  el.setAttribute('custom-content', args.customContent.toString());
116
124
  if (args.closeOnSelect !== undefined)
117
125
  el.setAttribute('close-on-select', args.closeOnSelect.toString());
126
+ if (args.customContent)
127
+ el.setAttribute('custom-content', args.customContent.toString());
128
+ if (args.closeOnSelect !== undefined)
129
+ el.setAttribute('close-on-select', args.closeOnSelect.toString());
118
130
  if (args.items && args.items.length > 0) {
119
131
  el.items = args.items;
120
132
  }
@@ -410,6 +422,9 @@ const CustomContentWithCheckboxesTemplate = args => {
410
422
  const button = document.createElement('sula-button');
411
423
  button.setAttribute('text', 'Confirmar seleção');
412
424
  button.setAttribute('full-width', 'true');
425
+ button.addEventListener('buttonClicked', () => {
426
+ el.showContent = false;
427
+ });
413
428
  slotContent.appendChild(button);
414
429
  el.appendChild(slotContent);
415
430
  el.addEventListener('dropdownClicked', args.dropdownClicked);
@@ -425,7 +440,7 @@ CustomContentWithCheckboxes.parameters = {
425
440
  layout: 'padded',
426
441
  docs: {
427
442
  description: {
428
- story: 'Demonstra o dropdown com conteúdo customizado contendo checkboxes e um botão de confirmação. Use a prop `contentMaxHeight` para controlar a altura máxima da área de conteúdo. O dropdown permanece aberto ao interagir com os itens internos (`closeOnSelect=false`).',
443
+ story: 'Demonstra o dropdown com conteúdo customizado contendo checkboxes e um botão de confirmação. O botão fecha o dropdown programaticamente via `showContent = false`. Use a prop `contentMaxHeight` para controlar a altura máxima da área de conteúdo. O dropdown permanece aberto ao interagir com os itens internos (`closeOnSelect=false`).',
429
444
  },
430
445
  },
431
446
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sula-dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/sula-dropdown/sula-drop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AK,CAAC,eAAe,GAAG,SAAS,CAAC;IAC1C,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC;IAC/B,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAEjC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACjD,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC1C,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEhC,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC5B,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAE7D,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mCAAmC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxF,2BAA2B,CAAC,IAAI,GAAG;IACjC,KAAK,EAAE,qBAAqB;IAC5B,gBAAgB,EAAE,GAAG;CACtB,CAAC;AACF,2BAA2B,CAAC,UAAU,GAAG;IACvC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE;YACX,KAAK,EACH,wQAAwQ;SAC3Q;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/sula-dropdown',\n tags: ['autodocs'],\n argTypes: {\n label: {\n control: 'text',\n defaultValue: 'Selecione uma opção',\n description: 'Label do dropdown',\n type: {\n required: false,\n },\n },\n disabled: {\n control: 'boolean',\n defaultValue: false,\n description: 'Define se o dropdown está desabilitado',\n type: {\n required: false,\n },\n },\n items: {\n control: 'object',\n defaultValue: [],\n description: 'Lista de itens para o dropdown',\n type: {\n required: false,\n },\n },\n value: {\n control: 'object',\n defaultValue: null,\n description: 'Valor selecionado do dropdown',\n type: {\n required: false,\n },\n },\n searchable: {\n control: 'boolean',\n defaultValue: false,\n description: 'Define se o dropdown permite busca',\n type: {\n required: false,\n },\n },\n menuMaxHeight: {\n control: 'number',\n defaultValue: 260,\n description: 'Altura máxima do menu em pixels (afeta o cálculo de auto-posicionamento)',\n type: {\n required: false,\n },\n },\n customContent: {\n control: 'boolean',\n defaultValue: false,\n description: 'Habilita conteúdo customizado via slot ao invés da lista de itens',\n type: {\n required: false,\n },\n },\n contentMaxHeight: {\n control: 'number',\n defaultValue: 260,\n description: 'Altura máxima da área de conteúdo customizado em pixels',\n type: {\n required: false,\n },\n },\n closeOnSelect: {\n control: 'boolean',\n defaultValue: true,\n description: 'Fecha o dropdown ao selecionar um item ou clicar dentro do conteúdo',\n type: {\n required: false,\n },\n },\n dropdownClicked: {\n action: 'dropdownClicked',\n description: 'Evento emitido quando o dropdown é clicado',\n },\n dropdownFocused: {\n action: 'dropdownFocused',\n description: 'Evento emitido quando o dropdown recebe foco',\n },\n dropdownFocusedOut: {\n action: 'dropdownFocusedOut',\n description: 'Evento emitido quando o dropdown perde o foco',\n },\n menuItemSelected: {\n action: 'menuItemSelected',\n description: 'Evento emitido quando um item é selecionado',\n },\n },\n parameters: {\n docs: {\n description: {\n component:\n 'O componente Dropdown Sula Design System é utilizado para exibição de opções de escolha. Seu intuito é ser usado junto com o botton sheet para selecionar opções variadas de itens em uma lista.',\n },\n },\n },\n};\n\nconst Template = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px'; // Define uma largura para melhor visualização\n\n const el = document.createElement('sula-dropdown');\n\n if (args.label) el.setAttribute('label', args.label);\n el.setAttribute('disabled', args.disabled.toString());\n if (args.searchable) el.setAttribute('searchable', args.searchable.toString());\n if (args.menuMaxHeight) el.setAttribute('menu-max-height', args.menuMaxHeight.toString());\n if (args.customContent) el.setAttribute('custom-content', args.customContent.toString());\n if (args.closeOnSelect !== undefined) el.setAttribute('close-on-select', args.closeOnSelect.toString());\n\n if (args.items && args.items.length > 0) {\n el.items = args.items;\n }\n\n if (args.value) {\n el.value = args.value;\n }\n\n // Adiciona os event listeners\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n el.addEventListener('dropdownFocused', args.dropdownFocused);\n el.addEventListener('dropdownFocusedOut', args.dropdownFocusedOut);\n el.addEventListener('menuItemSelected', args.menuItemSelected);\n\n container.appendChild(el);\n\n return container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n label: 'Selecione uma opção',\n disabled: false,\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n { id: '4', title: 'Opção 4' },\n ],\n value: null,\n};\n\nexport const WithSelectedValue = Template.bind({});\nWithSelectedValue.args = {\n label: 'País',\n disabled: false,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n ],\n value: { id: '1', title: 'Brasil' },\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n label: 'Dropdown desabilitado',\n disabled: true,\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n ],\n value: null,\n};\n\nexport const DisabledWithValue = Template.bind({});\nDisabledWithValue.args = {\n label: 'Estado',\n disabled: true,\n items: [\n { id: '1', title: 'São Paulo' },\n { id: '2', title: 'Rio de Janeiro' },\n { id: '3', title: 'Minas Gerais' },\n ],\n value: { id: '1', title: 'São Paulo' },\n};\n\nexport const EmptyItems = Template.bind({});\nEmptyItems.args = {\n label: 'Sem itens disponíveis',\n disabled: false,\n items: [],\n value: null,\n};\n\nexport const LongItemsList = Template.bind({});\nLongItemsList.args = {\n label: 'Lista com muitos itens',\n disabled: false,\n items: [\n { id: '1', title: 'Item 1' },\n { id: '2', title: 'Item 2' },\n { id: '3', title: 'Item 3' },\n { id: '4', title: 'Item 4' },\n { id: '5', title: 'Item 5' },\n { id: '6', title: 'Item 6' },\n { id: '7', title: 'Item 7' },\n { id: '8', title: 'Item 8' },\n { id: '9', title: 'Item 9' },\n { id: '10', title: 'Item 10' },\n ],\n value: null,\n};\n\nexport const Searchable = Template.bind({});\nSearchable.args = {\n label: 'Selecione um país',\n disabled: false,\n searchable: true,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n { id: '5', title: 'Paraguai' },\n { id: '6', title: 'Bolívia' },\n { id: '7', title: 'Peru' },\n { id: '8', title: 'Colômbia' },\n { id: '9', title: 'Venezuela' },\n { id: '10', title: 'Equador' },\n { id: '11', title: 'México' },\n { id: '12', title: 'Estados Unidos' },\n { id: '13', title: 'Canadá' },\n { id: '14', title: 'Portugal' },\n { id: '15', title: 'Espanha' },\n ],\n value: null,\n};\n\nexport const SearchableWithSelectedValue = Template.bind({});\nSearchableWithSelectedValue.args = {\n label: 'País de nascimento',\n disabled: false,\n searchable: true,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n { id: '5', title: 'Paraguai' },\n { id: '6', title: 'Bolívia' },\n { id: '7', title: 'Peru' },\n { id: '8', title: 'Colômbia' },\n { id: '9', title: 'Venezuela' },\n { id: '10', title: 'Equador' },\n ],\n value: { id: '1', title: 'Brasil' },\n};\n\nconst AutoPositioningTemplate = args => {\n const container = document.createElement('div');\n container.style.display = 'flex';\n container.style.gap = '2rem';\n container.style.margin = '20px';\n container.style.marginTop = '100px';\n container.style.marginBottom = '1000px';\n\n // Dropdown padrão\n const defaultWrapper = document.createElement('div');\n defaultWrapper.style.width = '300px';\n const defaultTitle = document.createElement('h4');\n defaultTitle.textContent = 'Padrão (260px)';\n defaultTitle.style.marginBottom = '8px';\n defaultTitle.style.fontSize = '14px';\n defaultTitle.style.fontWeight = 'bold';\n const defaultDesc = document.createElement('p');\n defaultDesc.textContent = 'Abre para cima quando há < 320px abaixo';\n defaultDesc.style.fontSize = '12px';\n defaultDesc.style.color = '#666';\n defaultDesc.style.marginBottom = '8px';\n \n const defaultDropdown = document.createElement('sula-dropdown');\n defaultDropdown.setAttribute('label', 'Dropdown Padrão');\n defaultDropdown.setAttribute('searchable', 'true');\n defaultDropdown.items = args.items;\n defaultDropdown.addEventListener('menuItemSelected', args.menuItemSelected);\n \n defaultWrapper.appendChild(defaultTitle);\n defaultWrapper.appendChild(defaultDesc);\n defaultWrapper.appendChild(defaultDropdown);\n\n // Dropdown custom\n const customWrapper = document.createElement('div');\n customWrapper.style.width = '300px';\n const customTitle = document.createElement('h4');\n customTitle.textContent = 'Custom (600px)';\n customTitle.style.marginBottom = '8px';\n customTitle.style.fontSize = '14px';\n customTitle.style.fontWeight = 'bold';\n const customDesc = document.createElement('p');\n customDesc.textContent = 'Abre para cima quando há < 660px abaixo';\n customDesc.style.fontSize = '12px';\n customDesc.style.color = '#666';\n customDesc.style.marginBottom = '8px';\n \n const customDropdown = document.createElement('sula-dropdown');\n customDropdown.setAttribute('label', 'Dropdown Custom');\n customDropdown.setAttribute('searchable', 'true');\n customDropdown.setAttribute('menu-max-height', '600');\n customDropdown.items = args.items;\n customDropdown.addEventListener('menuItemSelected', args.menuItemSelected);\n \n customWrapper.appendChild(customTitle);\n customWrapper.appendChild(customDesc);\n customWrapper.appendChild(customDropdown);\n\n // Instrução\n const instruction = document.createElement('p');\n instruction.textContent = 'Role a página para ter ~400-500px abaixo dos dropdowns. O Custom abrirá para CIMA, o Padrão para BAIXO.';\n instruction.style.fontSize = '12px';\n instruction.style.color = '#999';\n instruction.style.marginTop = '1rem';\n instruction.style.gridColumn = '1 / -1';\n\n container.appendChild(defaultWrapper);\n container.appendChild(customWrapper);\n\n const wrapper = document.createElement('div');\n wrapper.appendChild(container);\n wrapper.appendChild(instruction);\n\n return wrapper;\n};\n\nexport const AutoPositioning = AutoPositioningTemplate.bind({});\nAutoPositioning.args = {\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n { id: '4', title: 'Opção 4' },\n { id: '5', title: 'Opção 5' },\n { id: '6', title: 'Opção 6' },\n { id: '7', title: 'Opção 7' },\n { id: '8', title: 'Opção 8' },\n ],\n};\nAutoPositioning.parameters = {\n docs: {\n description: {\n story:\n 'Demonstra o auto-posicionamento do dropdown. O dropdown com menuMaxHeight maior (600px) é mais sensível e abre para cima com mais antecedência do que o padrão (260px). Role a página para observar o comportamento diferente.',\n },\n },\n};\n\nconst CustomContentTemplate = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px';\n container.style.paddingBottom = '300px';\n\n const el = document.createElement('sula-dropdown');\n el.setAttribute('label', args.label);\n el.setAttribute('custom-content', 'true');\n if (args.closeOnSelect !== undefined) el.setAttribute('close-on-select', args.closeOnSelect.toString());\n\n const slotContent = document.createElement('div');\n slotContent.style.padding = '16px';\n slotContent.style.background = 'white';\n slotContent.style.border = '1px solid #e0e0e0';\n slotContent.style.borderRadius = '8px';\n slotContent.innerHTML = `\n <p style=\"margin: 0 0 8px; font-weight: bold;\">Conteúdo customizado</p>\n <p style=\"margin: 0 0 12px; font-size: 14px; color: #666;\">Este conteúdo é renderizado via slot.</p>\n <button style=\"padding: 8px 16px; background: #0066cc; color: white; border: none; border-radius: 4px; cursor: pointer;\">Ação personalizada</button>\n `;\n el.appendChild(slotContent);\n\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n\n container.appendChild(el);\n return container;\n};\n\nexport const CustomContent = CustomContentTemplate.bind({});\nCustomContent.args = {\n label: 'Dropdown com conteúdo customizado',\n customContent: true,\n closeOnSelect: true,\n};\nCustomContent.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Demonstra o uso do dropdown com conteúdo customizado via slot. Ao invés de renderizar uma lista de itens, o dropdown exibe o conteúdo HTML passado como filho.',\n },\n },\n};\n\nexport const CustomContentPersistent = CustomContentTemplate.bind({});\nCustomContentPersistent.args = {\n label: 'Dropdown persistente',\n customContent: true,\n closeOnSelect: false,\n};\nCustomContentPersistent.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Dropdown com conteúdo customizado e closeOnSelect=false. O dropdown permanece aberto ao interagir com o conteúdo interno. Só fecha ao clicar fora.',\n },\n },\n};\n\nconst CustomContentWithCheckboxesTemplate = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px';\n container.style.paddingBottom = '400px';\n\n const el = document.createElement('sula-dropdown');\n el.setAttribute('label', args.label);\n el.setAttribute('custom-content', 'true');\n el.setAttribute('close-on-select', 'false');\n if (args.contentMaxHeight) el.setAttribute('content-max-height', args.contentMaxHeight.toString());\n\n const slotContent = document.createElement('div');\n slotContent.style.padding = '12px';\n slotContent.style.display = 'flex';\n slotContent.style.flexDirection = 'column';\n slotContent.style.gap = '8px';\n\n const checkboxLabels = ['Opção 1', 'Opção 2', 'Opção 3', 'Opção 4', 'Opção 5', 'Opção 6'];\n checkboxLabels.forEach(label => {\n const checkbox = document.createElement('sula-checkbox');\n checkbox.setAttribute('label', label);\n slotContent.appendChild(checkbox);\n });\n\n const divider = document.createElement('div');\n divider.style.height = '1px';\n divider.style.backgroundColor = '#e0e0e0';\n divider.style.margin = '4px 0';\n slotContent.appendChild(divider);\n\n const button = document.createElement('sula-button');\n button.setAttribute('text', 'Confirmar seleção');\n button.setAttribute('full-width', 'true');\n slotContent.appendChild(button);\n\n el.appendChild(slotContent);\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n\n container.appendChild(el);\n return container;\n};\n\nexport const CustomContentWithCheckboxes = CustomContentWithCheckboxesTemplate.bind({});\nCustomContentWithCheckboxes.args = {\n label: 'Selecione as opções',\n contentMaxHeight: 500,\n};\nCustomContentWithCheckboxes.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Demonstra o dropdown com conteúdo customizado contendo checkboxes e um botão de confirmação. Use a prop `contentMaxHeight` para controlar a altura máxima da área de conteúdo. O dropdown permanece aberto ao interagir com os itens internos (`closeOnSelect=false`).',\n },\n },\n};\n"]}
1
+ {"version":3,"file":"sula-dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/sula-dropdown/sula-dropdown.stories.tsx"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,qBAAqB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,UAAU,EAAE;YACV,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,oCAAoC;YACjD,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,aAAa,EAAE;YACb,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE,GAAG;YACjB,WAAW,EAAE,0EAA0E;YACvF,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,aAAa,EAAE;YACb,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB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AE,CAAC,CAAC;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mCAAmC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxF,2BAA2B,CAAC,IAAI,GAAG;IACjC,KAAK,EAAE,qBAAqB;IAC5B,gBAAgB,EAAE,GAAG;CACtB,CAAC;AACF,2BAA2B,CAAC,UAAU,GAAG;IACvC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE;YACX,KAAK,EACH,8UAA8U;SACjV;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/sula-dropdown',\n tags: ['autodocs'],\n argTypes: {\n label: {\n control: 'text',\n defaultValue: 'Selecione uma opção',\n description: 'Label do dropdown',\n type: {\n required: false,\n },\n },\n disabled: {\n control: 'boolean',\n defaultValue: false,\n description: 'Define se o dropdown está desabilitado',\n type: {\n required: false,\n },\n },\n items: {\n control: 'object',\n defaultValue: [],\n description: 'Lista de itens para o dropdown',\n type: {\n required: false,\n },\n },\n value: {\n control: 'object',\n defaultValue: null,\n description: 'Valor selecionado do dropdown',\n type: {\n required: false,\n },\n },\n searchable: {\n control: 'boolean',\n defaultValue: false,\n description: 'Define se o dropdown permite busca',\n type: {\n required: false,\n },\n },\n menuMaxHeight: {\n control: 'number',\n defaultValue: 260,\n description: 'Altura máxima do menu em pixels (afeta o cálculo de auto-posicionamento)',\n type: {\n required: false,\n },\n },\n customContent: {\n control: 'boolean',\n defaultValue: false,\n description: 'Habilita conteúdo customizado via slot ao invés da lista de itens',\n type: {\n required: false,\n },\n },\n contentMaxHeight: {\n control: 'number',\n defaultValue: 260,\n description: 'Altura máxima da área de conteúdo customizado em pixels',\n type: {\n required: false,\n },\n },\n closeOnSelect: {\n control: 'boolean',\n defaultValue: true,\n description: 'Fecha o dropdown ao selecionar um item ou clicar dentro do conteúdo',\n type: {\n required: false,\n },\n },\n showContent: {\n control: 'boolean',\n defaultValue: false,\n description: 'Controla programaticamente a abertura/fechamento do dropdown',\n type: {\n required: false,\n },\n },\n dropdownClicked: {\n action: 'dropdownClicked',\n description: 'Evento emitido quando o dropdown é clicado',\n },\n dropdownFocused: {\n action: 'dropdownFocused',\n description: 'Evento emitido quando o dropdown recebe foco',\n },\n dropdownFocusedOut: {\n action: 'dropdownFocusedOut',\n description: 'Evento emitido quando o dropdown perde o foco',\n },\n menuItemSelected: {\n action: 'menuItemSelected',\n description: 'Evento emitido quando um item é selecionado',\n },\n },\n parameters: {\n docs: {\n description: {\n component:\n 'O componente Dropdown Sula Design System é utilizado para exibição de opções de escolha. Seu intuito é ser usado junto com o botton sheet para selecionar opções variadas de itens em uma lista.',\n },\n },\n },\n};\n\nconst Template = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px'; // Define uma largura para melhor visualização\n\n const el = document.createElement('sula-dropdown');\n\n if (args.label) el.setAttribute('label', args.label);\n el.setAttribute('disabled', args.disabled.toString());\n if (args.searchable) el.setAttribute('searchable', args.searchable.toString());\n if (args.menuMaxHeight) el.setAttribute('menu-max-height', args.menuMaxHeight.toString());\n if (args.customContent) el.setAttribute('custom-content', args.customContent.toString());\n if (args.closeOnSelect !== undefined) el.setAttribute('close-on-select', args.closeOnSelect.toString());\n if (args.customContent) el.setAttribute('custom-content', args.customContent.toString());\n if (args.closeOnSelect !== undefined) el.setAttribute('close-on-select', args.closeOnSelect.toString());\n\n if (args.items && args.items.length > 0) {\n el.items = args.items;\n }\n\n if (args.value) {\n el.value = args.value;\n }\n\n // Adiciona os event listeners\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n el.addEventListener('dropdownFocused', args.dropdownFocused);\n el.addEventListener('dropdownFocusedOut', args.dropdownFocusedOut);\n el.addEventListener('menuItemSelected', args.menuItemSelected);\n\n container.appendChild(el);\n\n return container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n label: 'Selecione uma opção',\n disabled: false,\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n { id: '4', title: 'Opção 4' },\n ],\n value: null,\n};\n\nexport const WithSelectedValue = Template.bind({});\nWithSelectedValue.args = {\n label: 'País',\n disabled: false,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n ],\n value: { id: '1', title: 'Brasil' },\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n label: 'Dropdown desabilitado',\n disabled: true,\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n ],\n value: null,\n};\n\nexport const DisabledWithValue = Template.bind({});\nDisabledWithValue.args = {\n label: 'Estado',\n disabled: true,\n items: [\n { id: '1', title: 'São Paulo' },\n { id: '2', title: 'Rio de Janeiro' },\n { id: '3', title: 'Minas Gerais' },\n ],\n value: { id: '1', title: 'São Paulo' },\n};\n\nexport const EmptyItems = Template.bind({});\nEmptyItems.args = {\n label: 'Sem itens disponíveis',\n disabled: false,\n items: [],\n value: null,\n};\n\nexport const LongItemsList = Template.bind({});\nLongItemsList.args = {\n label: 'Lista com muitos itens',\n disabled: false,\n items: [\n { id: '1', title: 'Item 1' },\n { id: '2', title: 'Item 2' },\n { id: '3', title: 'Item 3' },\n { id: '4', title: 'Item 4' },\n { id: '5', title: 'Item 5' },\n { id: '6', title: 'Item 6' },\n { id: '7', title: 'Item 7' },\n { id: '8', title: 'Item 8' },\n { id: '9', title: 'Item 9' },\n { id: '10', title: 'Item 10' },\n ],\n value: null,\n};\n\nexport const Searchable = Template.bind({});\nSearchable.args = {\n label: 'Selecione um país',\n disabled: false,\n searchable: true,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n { id: '5', title: 'Paraguai' },\n { id: '6', title: 'Bolívia' },\n { id: '7', title: 'Peru' },\n { id: '8', title: 'Colômbia' },\n { id: '9', title: 'Venezuela' },\n { id: '10', title: 'Equador' },\n { id: '11', title: 'México' },\n { id: '12', title: 'Estados Unidos' },\n { id: '13', title: 'Canadá' },\n { id: '14', title: 'Portugal' },\n { id: '15', title: 'Espanha' },\n ],\n value: null,\n};\n\nexport const SearchableWithSelectedValue = Template.bind({});\nSearchableWithSelectedValue.args = {\n label: 'País de nascimento',\n disabled: false,\n searchable: true,\n items: [\n { id: '1', title: 'Brasil' },\n { id: '2', title: 'Argentina' },\n { id: '3', title: 'Chile' },\n { id: '4', title: 'Uruguai' },\n { id: '5', title: 'Paraguai' },\n { id: '6', title: 'Bolívia' },\n { id: '7', title: 'Peru' },\n { id: '8', title: 'Colômbia' },\n { id: '9', title: 'Venezuela' },\n { id: '10', title: 'Equador' },\n ],\n value: { id: '1', title: 'Brasil' },\n};\n\nconst AutoPositioningTemplate = args => {\n const container = document.createElement('div');\n container.style.display = 'flex';\n container.style.gap = '2rem';\n container.style.margin = '20px';\n container.style.marginTop = '100px';\n container.style.marginBottom = '1000px';\n\n // Dropdown padrão\n const defaultWrapper = document.createElement('div');\n defaultWrapper.style.width = '300px';\n const defaultTitle = document.createElement('h4');\n defaultTitle.textContent = 'Padrão (260px)';\n defaultTitle.style.marginBottom = '8px';\n defaultTitle.style.fontSize = '14px';\n defaultTitle.style.fontWeight = 'bold';\n const defaultDesc = document.createElement('p');\n defaultDesc.textContent = 'Abre para cima quando há < 320px abaixo';\n defaultDesc.style.fontSize = '12px';\n defaultDesc.style.color = '#666';\n defaultDesc.style.marginBottom = '8px';\n \n const defaultDropdown = document.createElement('sula-dropdown');\n defaultDropdown.setAttribute('label', 'Dropdown Padrão');\n defaultDropdown.setAttribute('searchable', 'true');\n defaultDropdown.items = args.items;\n defaultDropdown.addEventListener('menuItemSelected', args.menuItemSelected);\n \n defaultWrapper.appendChild(defaultTitle);\n defaultWrapper.appendChild(defaultDesc);\n defaultWrapper.appendChild(defaultDropdown);\n\n // Dropdown custom\n const customWrapper = document.createElement('div');\n customWrapper.style.width = '300px';\n const customTitle = document.createElement('h4');\n customTitle.textContent = 'Custom (600px)';\n customTitle.style.marginBottom = '8px';\n customTitle.style.fontSize = '14px';\n customTitle.style.fontWeight = 'bold';\n const customDesc = document.createElement('p');\n customDesc.textContent = 'Abre para cima quando há < 660px abaixo';\n customDesc.style.fontSize = '12px';\n customDesc.style.color = '#666';\n customDesc.style.marginBottom = '8px';\n \n const customDropdown = document.createElement('sula-dropdown');\n customDropdown.setAttribute('label', 'Dropdown Custom');\n customDropdown.setAttribute('searchable', 'true');\n customDropdown.setAttribute('menu-max-height', '600');\n customDropdown.items = args.items;\n customDropdown.addEventListener('menuItemSelected', args.menuItemSelected);\n \n customWrapper.appendChild(customTitle);\n customWrapper.appendChild(customDesc);\n customWrapper.appendChild(customDropdown);\n\n // Instrução\n const instruction = document.createElement('p');\n instruction.textContent = 'Role a página para ter ~400-500px abaixo dos dropdowns. O Custom abrirá para CIMA, o Padrão para BAIXO.';\n instruction.style.fontSize = '12px';\n instruction.style.color = '#999';\n instruction.style.marginTop = '1rem';\n instruction.style.gridColumn = '1 / -1';\n\n container.appendChild(defaultWrapper);\n container.appendChild(customWrapper);\n\n const wrapper = document.createElement('div');\n wrapper.appendChild(container);\n wrapper.appendChild(instruction);\n\n return wrapper;\n};\n\nexport const AutoPositioning = AutoPositioningTemplate.bind({});\nAutoPositioning.args = {\n items: [\n { id: '1', title: 'Opção 1' },\n { id: '2', title: 'Opção 2' },\n { id: '3', title: 'Opção 3' },\n { id: '4', title: 'Opção 4' },\n { id: '5', title: 'Opção 5' },\n { id: '6', title: 'Opção 6' },\n { id: '7', title: 'Opção 7' },\n { id: '8', title: 'Opção 8' },\n ],\n};\nAutoPositioning.parameters = {\n docs: {\n description: {\n story:\n 'Demonstra o auto-posicionamento do dropdown. O dropdown com menuMaxHeight maior (600px) é mais sensível e abre para cima com mais antecedência do que o padrão (260px). Role a página para observar o comportamento diferente.',\n },\n },\n};\n\nconst CustomContentTemplate = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px';\n container.style.paddingBottom = '300px';\n\n const el = document.createElement('sula-dropdown');\n el.setAttribute('label', args.label);\n el.setAttribute('custom-content', 'true');\n if (args.closeOnSelect !== undefined) el.setAttribute('close-on-select', args.closeOnSelect.toString());\n\n const slotContent = document.createElement('div');\n slotContent.style.padding = '16px';\n slotContent.style.background = 'white';\n slotContent.style.border = '1px solid #e0e0e0';\n slotContent.style.borderRadius = '8px';\n slotContent.innerHTML = `\n <p style=\"margin: 0 0 8px; font-weight: bold;\">Conteúdo customizado</p>\n <p style=\"margin: 0 0 12px; font-size: 14px; color: #666;\">Este conteúdo é renderizado via slot.</p>\n <button style=\"padding: 8px 16px; background: #0066cc; color: white; border: none; border-radius: 4px; cursor: pointer;\">Ação personalizada</button>\n `;\n el.appendChild(slotContent);\n\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n\n container.appendChild(el);\n return container;\n};\n\nexport const CustomContent = CustomContentTemplate.bind({});\nCustomContent.args = {\n label: 'Dropdown com conteúdo customizado',\n customContent: true,\n closeOnSelect: true,\n};\nCustomContent.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Demonstra o uso do dropdown com conteúdo customizado via slot. Ao invés de renderizar uma lista de itens, o dropdown exibe o conteúdo HTML passado como filho.',\n },\n },\n};\n\nexport const CustomContentPersistent = CustomContentTemplate.bind({});\nCustomContentPersistent.args = {\n label: 'Dropdown persistente',\n customContent: true,\n closeOnSelect: false,\n};\nCustomContentPersistent.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Dropdown com conteúdo customizado e closeOnSelect=false. O dropdown permanece aberto ao interagir com o conteúdo interno. Só fecha ao clicar fora.',\n },\n },\n};\n\nconst CustomContentWithCheckboxesTemplate = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.width = '300px';\n container.style.paddingBottom = '400px';\n\n const el = document.createElement('sula-dropdown');\n el.setAttribute('label', args.label);\n el.setAttribute('custom-content', 'true');\n el.setAttribute('close-on-select', 'false');\n if (args.contentMaxHeight) el.setAttribute('content-max-height', args.contentMaxHeight.toString());\n\n const slotContent = document.createElement('div');\n slotContent.style.padding = '12px';\n slotContent.style.display = 'flex';\n slotContent.style.flexDirection = 'column';\n slotContent.style.gap = '8px';\n\n const checkboxLabels = ['Opção 1', 'Opção 2', 'Opção 3', 'Opção 4', 'Opção 5', 'Opção 6'];\n checkboxLabels.forEach(label => {\n const checkbox = document.createElement('sula-checkbox');\n checkbox.setAttribute('label', label);\n slotContent.appendChild(checkbox);\n });\n\n const divider = document.createElement('div');\n divider.style.height = '1px';\n divider.style.backgroundColor = '#e0e0e0';\n divider.style.margin = '4px 0';\n slotContent.appendChild(divider);\n\n const button = document.createElement('sula-button');\n button.setAttribute('text', 'Confirmar seleção');\n button.setAttribute('full-width', 'true');\n button.addEventListener('buttonClicked', () => {\n el.showContent = false;\n });\n slotContent.appendChild(button);\n\n el.appendChild(slotContent);\n el.addEventListener('dropdownClicked', args.dropdownClicked);\n\n container.appendChild(el);\n return container;\n};\n\nexport const CustomContentWithCheckboxes = CustomContentWithCheckboxesTemplate.bind({});\nCustomContentWithCheckboxes.args = {\n label: 'Selecione as opções',\n contentMaxHeight: 500,\n};\nCustomContentWithCheckboxes.parameters = {\n layout: 'padded',\n docs: {\n description: {\n story:\n 'Demonstra o dropdown com conteúdo customizado contendo checkboxes e um botão de confirmação. O botão fecha o dropdown programaticamente via `showContent = false`. Use a prop `contentMaxHeight` para controlar a altura máxima da área de conteúdo. O dropdown permanece aberto ao interagir com os itens internos (`closeOnSelect=false`).',\n },\n },\n};\n"]}
@@ -33,7 +33,10 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
33
33
  * Close dropdown when an item is selected or content is clicked
34
34
  */
35
35
  this.closeOnSelect = true;
36
- this.showItems = false;
36
+ /**
37
+ * Show or hide dropdown content
38
+ */
39
+ this.showContent = false;
37
40
  this.isFocused = false;
38
41
  this.searchTerm = '';
39
42
  this.filteredItems = [];
@@ -43,9 +46,9 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
43
46
  return;
44
47
  this.dropdownClicked.emit();
45
48
  if (this.customContent || this.items.length > 0) {
46
- this.showItems = !this.showItems;
49
+ this.showContent = !this.showContent;
47
50
  }
48
- if (this.searchable && this.showItems && this.searchInputRef) {
51
+ if (this.searchable && this.showContent && this.searchInputRef) {
49
52
  this.searchInputRef.focus();
50
53
  }
51
54
  };
@@ -55,7 +58,7 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
55
58
  this.menuItemSelected.emit(item.detail);
56
59
  if (this.closeOnSelect) {
57
60
  setTimeout(() => {
58
- this.showItems = false;
61
+ this.showContent = false;
59
62
  }, 0);
60
63
  }
61
64
  };
@@ -89,7 +92,7 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
89
92
  this.selectedItem = this.value;
90
93
  }
91
94
  }
92
- handleShowItemsChange(newValue) {
95
+ handleShowContentChange(newValue) {
93
96
  if (!newValue) {
94
97
  this.searchTerm = '';
95
98
  this.filteredItems = [];
@@ -101,11 +104,11 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
101
104
  const path = event.composedPath();
102
105
  const clickInside = path.some(el => el === this.node);
103
106
  if (!clickInside) {
104
- this.showItems = false;
107
+ this.showContent = false;
105
108
  }
106
109
  }
107
110
  handleWindowResize() {
108
- if (this.showItems) {
111
+ if (this.showContent) {
109
112
  this.calculateMenuPosition();
110
113
  }
111
114
  }
@@ -126,7 +129,7 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
126
129
  }
127
130
  }
128
131
  componentDidRender() {
129
- if (this.showItems) {
132
+ if (this.showContent) {
130
133
  this.calculateMenuPosition();
131
134
  if (this.searchable && this.searchInputRef) {
132
135
  this.searchInputRef.focus();
@@ -140,21 +143,21 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
140
143
  }
141
144
  render() {
142
145
  var _a;
143
- return (h(Host, { key: 'bcb9fc6510f1f67d054824aeb6d50502e20ab8d0', ref: node => (this.node = node) }, h("div", { key: 'a46d801d67e501faee720916fff32f37791b0ee9', class: {
146
+ return (h(Host, { key: '812029af9121bf2f6b10b426b93dc0095796d66d', ref: node => (this.node = node) }, h("div", { key: '24e4b075470cd3ac8311374d0eebbc9d62bc248e', class: {
144
147
  'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,
145
148
  'bg-surface-body cursor-pointer': !this.disabled,
146
149
  'bg-states-bg-disabled': this.disabled,
147
150
  'dropdown-focus': this.isFocused,
148
- }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'ef745b49c183c29d86fd50d3fa9d2084e75d8156', class: "flex flex-col w-full" }, h("label", { key: '833a6a1866ebc31842d746fd1beef1af7d368fed', class: {
149
- 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showItems),
150
- 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showItems),
151
+ }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '10bb402bb063b83a66996c3b21e345045779fea6', class: "flex flex-col w-full" }, h("label", { key: '9e6013e76bd927d9cf50bccfe542205b2db5ad3c', class: {
152
+ 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),
153
+ 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),
151
154
  'text-text-primary': !this.disabled,
152
155
  'text-text-disabled': this.disabled,
153
- } }, this.label), this.searchable && this.showItems ? (h("input", { ref: el => (this.searchInputRef = el), type: "text", value: this.searchTerm, onInput: this.handleSearchInput, placeholder: ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.title) || '', class: "w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4" })) : (!!this.selectedItem && (h("span", { class: {
156
+ } }, this.label), this.searchable && this.showContent ? (h("input", { ref: el => (this.searchInputRef = el), type: "text", value: this.searchTerm, onInput: this.handleSearchInput, placeholder: ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.title) || '', class: "w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4" })) : (!!this.selectedItem && (h("span", { class: {
154
157
  'text-base leading-4 pt-4': true,
155
158
  'text-text-primary': !this.disabled,
156
159
  'text-text-disabled': this.disabled,
157
- } }, this.selectedItem.title)))), h("div", { key: '1b8a1970c4750c3f314aa7d8e5193e8d9cfa3483', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: '635d6d6df91f4ea2d8d051ca7443941a44a7c856', icon: `ph ph-caret-${this.showItems ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showItems && (h("div", { key: '223e42138b156a98b1296e317599c2eb16e3a633', class: {
160
+ } }, this.selectedItem.title)))), h("div", { key: '9c570fe666a9e400882728dd6cc7375efc6fd9c3', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: 'c33165aec78c9d227a645d5a5390caa5f5580e48', icon: `ph ph-caret-${this.showContent ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showContent && (h("div", { key: 'a5f4c9c26cfc64bb39300474e8efb52174b538ab', class: {
158
161
  'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,
159
162
  'bottom-[72px]': this.openUpward,
160
163
  'top-[72px]': !this.openUpward,
@@ -169,7 +172,7 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
169
172
  }
170
173
  static get watchers() { return {
171
174
  "value": ["handleValueChange"],
172
- "showItems": ["handleShowItemsChange"]
175
+ "showContent": ["handleShowContentChange"]
173
176
  }; }
174
177
  static get style() { return sulaDropdownCss; }
175
178
  }, [1, "sula-dropdown", {
@@ -182,15 +185,15 @@ const SulaDropdown$1 = /*@__PURE__*/ proxyCustomElement(class SulaDropdown exten
182
185
  "contentMaxHeight": [2, "content-max-height"],
183
186
  "customContent": [516, "custom-content"],
184
187
  "closeOnSelect": [4, "close-on-select"],
188
+ "showContent": [1540, "show-content"],
185
189
  "selectedItem": [32],
186
- "showItems": [32],
187
190
  "isFocused": [32],
188
191
  "searchTerm": [32],
189
192
  "filteredItems": [32],
190
193
  "openUpward": [32]
191
194
  }, [[4, "click", "handleDocumentClick"], [9, "resize", "handleWindowResize"]], {
192
195
  "value": ["handleValueChange"],
193
- "showItems": ["handleShowItemsChange"]
196
+ "showContent": ["handleShowContentChange"]
194
197
  }]);
195
198
  function defineCustomElement$1() {
196
199
  if (typeof customElements === "undefined") {