@bds-web/ui 1.9.0 → 1.11.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownPortal.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/ui/DropdownPortal.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,GAAI,oCAAoC,mBAAmB,uCAgCrF,CAAC"}
1
+ {"version":3,"file":"DropdownPortal.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/ui/DropdownPortal.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,GAAI,oCAAoC,mBAAmB,uCAiCrF,CAAC"}
@@ -22,5 +22,5 @@ export const DropdownPortal = ({ children, containerRef, isOpen }) => {
22
22
  left: position.left,
23
23
  width: position.width,
24
24
  zIndex: 100000,
25
- }, children: children }), document.body);
25
+ }, onPointerDown: e => e.stopPropagation(), children: children }), document.body);
26
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/ui/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM/C,eAAO,MAAM,QAAQ,GAAI,uDAMtB,aAAa,4CAkCf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/ui/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM/C,eAAO,MAAM,QAAQ,GAAI,uDAMtB,aAAa,4CAqCf,CAAC"}
@@ -8,5 +8,8 @@ import { DropdownPortal } from "./DropdownPortal";
8
8
  export const Dropdown = ({ dropdownSize = "small", onSelect, options, selected, width = "auto", }) => {
9
9
  const { isOpen, closeDropdown, toggleDropdown } = useDropdown();
10
10
  const containerRef = useOutsideClick(isOpen, closeDropdown);
11
- return (_jsxs(S.Container, { ref: containerRef, "$size": dropdownSize, "$width": width, onClick: toggleDropdown, style: { position: "relative" }, children: [_jsxs(S.SelectedItem, { children: [_jsx(S.SelectedText, { children: selected ? selected.name : "선택해주세요." }), _jsx(TriangleIcon, {})] }), _jsx(DropdownPortal, { containerRef: containerRef, isOpen: isOpen, children: _jsx(S.OptionsList, { "$size": dropdownSize, "$isOpen": isOpen, children: options.map((option, idx) => (_jsx(S.OptionItem, { "$isSelected": selected?.value === option.value, "$size": dropdownSize, onClick: () => onSelect(option), children: option.name }, idx))) }) })] }));
11
+ return (_jsxs(S.Container, { ref: containerRef, "$size": dropdownSize, "$width": width, onClick: toggleDropdown, style: { position: "relative" }, children: [_jsxs(S.SelectedItem, { children: [_jsx(S.SelectedText, { children: selected ? selected.name : "선택해주세요." }), _jsx(TriangleIcon, {})] }), _jsx(DropdownPortal, { containerRef: containerRef, isOpen: isOpen, children: _jsx(S.OptionsList, { "$size": dropdownSize, "$isOpen": isOpen, children: options.map((option, idx) => (_jsx(S.OptionItem, { "$isSelected": selected?.value === option.value, "$size": dropdownSize, onClick: () => {
12
+ onSelect(option);
13
+ closeDropdown();
14
+ }, children: option.name }, idx))) }) })] }));
12
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bds-web/ui",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",