@aloudata/aloudata-design 2.13.12 → 2.13.14

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.
@@ -131,15 +131,16 @@
131
131
  }
132
132
 
133
133
  .ald-data-preview-progress {
134
- position: absolute;
134
+ position: fixed;
135
+ width: 100%;
135
136
  top: 0;
136
137
  left: 0;
137
138
  z-index: 3;
138
139
  }
139
140
 
140
141
  .ald-data-preview-table-error {
141
- height: calc(100% - 28px);
142
142
  display: flex;
143
+ height: 100%;
143
144
  align-items: center;
144
145
  justify-content: center;
145
146
  font-size: 16px;
@@ -152,5 +153,6 @@
152
153
  display: flex;
153
154
  justify-content: center;
154
155
  align-items: center;
155
- height: 200px;
156
+ height: 100%;
157
+ position: fixed;
156
158
  }
@@ -1,4 +1,4 @@
1
- import { OffsetOptions, UseHoverProps } from '@floating-ui/react';
1
+ import { FloatingFocusManagerProps, OffsetOptions, UseHoverProps } from '@floating-ui/react';
2
2
  import React from 'react';
3
3
  import { MenuProps } from '../Menu';
4
4
  import './style/index.less';
@@ -77,5 +77,9 @@ export interface IDropdownProps {
77
77
  * @default false
78
78
  */
79
79
  autoUpdatePos?: boolean;
80
+ /**
81
+ * @description 初始化焦点,参照:https://floating-ui.com/docs/floatingfocusmanager#initialfocus
82
+ */
83
+ initialFocus?: FloatingFocusManagerProps['initialFocus'];
80
84
  }
81
85
  export default function Dropdown(props: IDropdownProps): React.JSX.Element;
@@ -41,7 +41,8 @@ export default function Dropdown(props) {
41
41
  _props$delay = props.delay,
42
42
  delay = _props$delay === void 0 ? 0 : _props$delay,
43
43
  _props$autoUpdatePos = props.autoUpdatePos,
44
- autoUpdatePos = _props$autoUpdatePos === void 0 ? false : _props$autoUpdatePos;
44
+ autoUpdatePos = _props$autoUpdatePos === void 0 ? false : _props$autoUpdatePos,
45
+ initialFocus = props.initialFocus;
45
46
  var _useState = useState(open || false),
46
47
  _useState2 = _slicedToArray(_useState, 2),
47
48
  isOpen = _useState2[0],
@@ -140,7 +141,8 @@ export default function Dropdown(props) {
140
141
  var renderFloatingContent = useCallback(function () {
141
142
  var popupElem = /*#__PURE__*/React.createElement(FloatingFocusManager, {
142
143
  context: context,
143
- modal: false
144
+ modal: false,
145
+ initialFocus: initialFocus
144
146
  }, /*#__PURE__*/React.createElement("div", _extends({
145
147
  className: classNames('ald-dropdown-overlay', overlayClassName, _defineProperty({}, 'ald-dropdown-overlay-hidden', !isOpen)),
146
148
  ref: refs.setFloating,
@@ -149,7 +151,7 @@ export default function Dropdown(props) {
149
151
  }, getFloatingProps()), popupElement));
150
152
  var popupContainer = typeof getPopupContainer === 'function' ? getPopupContainer() : document.body;
151
153
  return /*#__PURE__*/ReactDOM.createPortal(popupElem, popupContainer);
152
- }, [context, floatingStyles, getFloatingProps, getPopupContainer, headingId, popupElement, refs.setFloating, overlayClassName, overlayStyle, isOpen]);
154
+ }, [context, floatingStyles, getFloatingProps, getPopupContainer, headingId, popupElement, refs.setFloating, overlayClassName, overlayStyle, isOpen, initialFocus]);
153
155
  var popup = destroyPopupOnHide ? isOpen && renderFloatingContent() : renderFloatingContent();
154
156
  var setTargetRef = useCallback(function (node) {
155
157
  refs.setReference(node);
@@ -64,7 +64,7 @@
64
64
  .input-color(@input-focus-border-color,@input-focus-text-color,@input-focus-bg-color,@input-focus-placeholder-color);
65
65
  }
66
66
 
67
- &.ald-input-disabled {
67
+ &.ant-input-disabled {
68
68
  cursor: default;
69
69
  .input-color(@input-disabled-border-color,@input-disabled-text-color,@input-disabled-bg-color,@input-disabled-placeholder-color);
70
70
  }
@@ -16,7 +16,7 @@ export default function SelectedMemberTags(props) {
16
16
  _props$lockedIds = props.lockedIds,
17
17
  lockedIds = _props$lockedIds === void 0 ? [] : _props$lockedIds;
18
18
  var _ConfigProvider$useGe = ConfigProvider.useGetUserList(),
19
- memberPickerItemMoreInfoKey = _ConfigProvider$useGe.memberPickerItemMoreInfoKey;
19
+ getMemberPickerItemMoreInfoKey = _ConfigProvider$useGe.getMemberPickerItemMoreInfoKey;
20
20
  var _useContext = useContext(LocaleContext),
21
21
  locale = _useContext.locale;
22
22
  var t = getTranslator(locale);
@@ -59,7 +59,7 @@ export default function SelectedMemberTags(props) {
59
59
  account: getAccount(user),
60
60
  addonBefore: user.type === 'USER' && /*#__PURE__*/React.createElement("span", {
61
61
  className: "ald-member-picker-option-id"
62
- }, user[memberPickerItemMoreInfoKey || 'userId'])
62
+ }, getMemberPickerItemMoreInfoKey ? getMemberPickerItemMoreInfoKey(user) : user.userId)
63
63
  })), isUser(user) && user.ban && /*#__PURE__*/React.createElement(Badge, {
64
64
  status: "default",
65
65
  count: t.MemberPicker.ban,
@@ -6,6 +6,10 @@
6
6
  .ant-select-selection-placeholder {
7
7
  color: var(--alias-colors-text-subtlest, #9ca3af);
8
8
  }
9
+
10
+ .ant-select-selection-item {
11
+ color: @textColor;
12
+ }
9
13
  }
10
14
 
11
15
  .ald-select.ald-select-primary {
@@ -44,7 +48,7 @@
44
48
  }
45
49
 
46
50
  &.ald-select-disabled {
47
- .select-color(var(--alias-colors-border-disabled, rgba(0, 0, 0, 0.1)),var(--alias-colors-bg-transp, rgba(0, 0, 0, 0)),var(--alias-colors-text-disabled, rgba(0, 0, 0, 0.25)));
51
+ .select-color(var(--alias-colors-border-disabled, rgba(0, 0, 0, 0.1)),var(--alias-colors-bg-transp, rgba(0, 0, 0, 0)),var(--alias-colors-text-default, #1f2937));
48
52
 
49
53
  cursor: default;
50
54
 
@@ -106,7 +110,7 @@
106
110
  }
107
111
 
108
112
  &.ald-select-disabled {
109
- .select-color(var(--alias-colors-border-disabled, rgba(0, 0, 0, 0.1)),var(--alias-colors-bg-transp, rgba(0, 0, 0, 0)),var(--alias-colors-text-disabled, rgba(0, 0, 0, 0.25)));
113
+ .select-color(var(--alias-colors-border-disabled, rgba(0, 0, 0, 0.1)),var(--alias-colors-bg-transp, rgba(0, 0, 0, 0)),var(--alias-colors-text-default, #1f2937));
110
114
 
111
115
  cursor: default;
112
116