sellmate-design-system-react 0.8.0 → 0.8.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/components/SChipInput/SChipInput.cjs +3 -0
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +3 -0
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +11 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +11 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +3 -0
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.d.ts +3 -1
- package/dist/components/SPortal/SPortal.js +3 -0
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +11 -1
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +11 -1
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +11 -1
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +11 -1
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4399,6 +4399,7 @@ function SPortal({
|
|
|
4399
4399
|
viewportPadding = 0,
|
|
4400
4400
|
onOpenAutoFocus,
|
|
4401
4401
|
onCloseAutoFocus,
|
|
4402
|
+
onPointerDownOutside,
|
|
4402
4403
|
children,
|
|
4403
4404
|
className,
|
|
4404
4405
|
style,
|
|
@@ -4427,7 +4428,9 @@ function SPortal({
|
|
|
4427
4428
|
onPointerDownOutside: (e) => {
|
|
4428
4429
|
if (persistent || anchorRef.current?.contains(e.target)) {
|
|
4429
4430
|
e.preventDefault();
|
|
4431
|
+
return;
|
|
4430
4432
|
}
|
|
4433
|
+
onPointerDownOutside?.(e);
|
|
4431
4434
|
},
|
|
4432
4435
|
onFocusOutside: (e) => {
|
|
4433
4436
|
if (persistent || anchorRef.current?.contains(e.target)) {
|
|
@@ -6331,6 +6334,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
6331
6334
|
const triggerRef = useRef(null);
|
|
6332
6335
|
const searchInputRef = useRef(null);
|
|
6333
6336
|
const listRef = useRef(null);
|
|
6337
|
+
const dismissedByPointerRef = useRef(false);
|
|
6334
6338
|
const flat = useMemo(() => flattenOptions(options), [options]);
|
|
6335
6339
|
const selectable = useMemo(() => selectableOptions(flat), [flat]);
|
|
6336
6340
|
const hasLeaf = useMemo(() => flat.some((o) => !o.isGroup), [flat]);
|
|
@@ -6360,7 +6364,9 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
6360
6364
|
const commitOpen = (next) => {
|
|
6361
6365
|
setOpen(next);
|
|
6362
6366
|
onOpenChange?.(next);
|
|
6363
|
-
if (
|
|
6367
|
+
if (next) {
|
|
6368
|
+
dismissedByPointerRef.current = false;
|
|
6369
|
+
} else {
|
|
6364
6370
|
setPendingOpen(false);
|
|
6365
6371
|
setSearch("");
|
|
6366
6372
|
if (rules && rules.length > 0) {
|
|
@@ -6584,8 +6590,12 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
6584
6590
|
event.preventDefault();
|
|
6585
6591
|
requestAnimationFrame(() => searchInputRef.current?.focus());
|
|
6586
6592
|
},
|
|
6593
|
+
onPointerDownOutside: () => {
|
|
6594
|
+
dismissedByPointerRef.current = true;
|
|
6595
|
+
},
|
|
6587
6596
|
onCloseAutoFocus: (event) => {
|
|
6588
6597
|
event.preventDefault();
|
|
6598
|
+
if (dismissedByPointerRef.current) return;
|
|
6589
6599
|
triggerRef.current?.focus();
|
|
6590
6600
|
},
|
|
6591
6601
|
className: "rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)]",
|