Skip to content

Commit

Permalink
Merge branch 'main' into release/8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zarahzachz committed Sep 13, 2023
2 parents f358ba8 + 7577a96 commit 059c55c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const Dropdown: React.FC<DropdownProps> = (props: DropdownProps) => {
debounce((event: React.FocusEvent<HTMLElement>) => {
// Only call the user's onBlur handler if focus leaves the whole component
if (!wrapperRef.current?.contains(document.activeElement)) {
userOnBlur(event);
userOnBlur?.(event);
state.setOpen(false);
}
}, 20),
Expand Down
49 changes: 46 additions & 3 deletions packages/design-system/src/components/react-aria/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,56 @@
import $73SJx$react, { useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
import $12uGp$clsx from 'clsx';
import { _ as _$1 } from '@swc/helpers/_/_class_private_field_get';
import { _ as _$2 } from '@swc/helpers/_/_class_private_field_init';
import { _ } from '@swc/helpers/_/_class_private_field_set';
import { LocalizedStringFormatter, LocalizedStringDictionary } from '@internationalized/string';
import '@internationalized/date';
import '@internationalized/number';
import 'react-dom';

// Inlining the following:
// import { _ as _$1 } from '@swc/helpers/_/_class_private_field_get';
// import { _ as _$2 } from '@swc/helpers/_/_class_private_field_init';
// import { _ } from '@swc/helpers/_/_class_private_field_set';
function _check_private_redeclaration(obj, privateCollection) {
if (privateCollection.has(obj)) {
throw new TypeError('Cannot initialize the same private elements twice on an object');
}
}
function _$2(obj, privateMap, value) {
_check_private_redeclaration(obj, privateMap);
privateMap.set(obj, value);
}
function _class_extract_field_descriptor(receiver, privateMap, action) {
if (!privateMap.has(receiver))
throw new TypeError('attempted to ' + action + ' private field on non-instance');

return privateMap.get(receiver);
}
function _class_apply_descriptor_get(receiver, descriptor) {
if (descriptor.get) return descriptor.get.call(receiver);

return descriptor.value;
}
function _$1(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor(receiver, privateMap, 'get');
return _class_apply_descriptor_get(receiver, descriptor);
}
function _class_apply_descriptor_set(receiver, descriptor, value) {
if (descriptor.set) descriptor.set.call(receiver, value);
else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError('attempted to set read only private field');
}
descriptor.value = value;
}
}
function _(receiver, privateMap, value) {
var descriptor = _class_extract_field_descriptor(receiver, privateMap, 'set');
_class_apply_descriptor_set(receiver, descriptor, value);
return value;
}

/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 059c55c

Please sign in to comment.