@procore/core-react 12.27.1 → 12.28.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.
- package/CHANGELOG.md +6 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.components.js +106 -15
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.constants.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.constants.js +1 -0
- package/dist/SuperSelect/SuperSelect.constants.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.js +5 -1
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +3 -0
- package/dist/SuperSelect/SuperSelect.styles.js +41 -37
- package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +35 -1
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.utils.d.ts +1 -0
- package/dist/SuperSelect/SuperSelect.utils.js +4 -1
- package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +111 -24
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.js +1 -1
- package/dist/TieredSelect/TieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +2 -0
- package/dist/_locales/en.json +2 -1
- package/dist/_locales/pseudo.json +2 -1
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +771 -771
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +30 -30
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +21 -21
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +7 -7
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var _excluded = ["hoverable"],
|
|
2
|
-
_excluded2 = ["children", "isDragging"]
|
|
2
|
+
_excluded2 = ["children", "isDragging"],
|
|
3
|
+
_excluded3 = ["children", "isDragging"];
|
|
3
4
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
6
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -21,7 +22,7 @@ import { OverflowObserver } from '../_hooks/OverflowObserver';
|
|
|
21
22
|
import { colors } from '../_styles/colors';
|
|
22
23
|
import { InternalDragDropContext } from './SuperSelect';
|
|
23
24
|
import { draggableOptionIdSymbol } from './SuperSelect.constants';
|
|
24
|
-
import { StyledArrow, StyledArrowContainer, StyledArrowFill, StyledArrowOutline, StyledCheckboxContainer, StyledCheckmarkContainer, StyledClearIcon, StyledDraggableWrapper, StyledEmptyMessage, StyledFooter, StyledGrip, StyledGroup, StyledHeader, StyledIndicators, StyledItem, StyledItemLabel, StyledLabel, StyledMultiInput, StyledMultiInputContainer, StyledMultiValue, StyledMultiValueContainer, StyledOptionGroupLabel, StyledOptions, StyledOverlay, StyledSearchContainer, StyledTrigger } from './SuperSelect.styles';
|
|
25
|
+
import { StyledArrow, StyledArrowContainer, StyledArrowFill, StyledArrowOutline, StyledCheckboxContainer, StyledCheckmarkContainer, StyledClearIcon, StyledDraggableWrapper, StyledEmptyMessage, StyledFooter, StyledGrip, StyledGroup, StyledHeader, StyledIndicators, StyledItem, StyledItemLabel, StyledLabel, StyledMultiInput, StyledMultiInputContainer, StyledMultiValue, StyledMultiValueContainer, StyledOptionGroupLabel, StyledOptions, StyledOverlay, StyledSearchContainer, StyledSelectAll, StyledTrigger } from './SuperSelect.styles';
|
|
25
26
|
import { useSuperSelectContext } from './useSuperSelect';
|
|
26
27
|
export var Overlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
27
28
|
return /*#__PURE__*/React.createElement(StyledOverlay, _extends({
|
|
@@ -222,6 +223,7 @@ export var Item = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
222
223
|
});
|
|
223
224
|
}, [knownSize]);
|
|
224
225
|
var index = props['data-index'];
|
|
226
|
+
var withSelectAllIndex = ctx.config.selectAllEnabled && ctx.config.multiple ? index + 1 : index;
|
|
225
227
|
var option = ctx.state.options[index];
|
|
226
228
|
if (!option) {
|
|
227
229
|
return null;
|
|
@@ -233,7 +235,7 @@ export var Item = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
233
235
|
var value = ctx === null || ctx === void 0 ? void 0 : ctx.option.value(option);
|
|
234
236
|
function setNode(node) {
|
|
235
237
|
if (ctx) {
|
|
236
|
-
ctx.refs.navigationList.current[
|
|
238
|
+
ctx.refs.navigationList.current[withSelectAllIndex] = node;
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
if (isOptgroup) {
|
|
@@ -246,14 +248,14 @@ export var Item = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
246
248
|
}), {
|
|
247
249
|
$disabled: ctx.option.isDisabled(option),
|
|
248
250
|
$emptyMinHeight: size,
|
|
249
|
-
$highlighted: ctx.state.activeMenuIndex ===
|
|
251
|
+
$highlighted: ctx.state.activeMenuIndex === withSelectAllIndex,
|
|
250
252
|
$isDraggable: !isDisabled,
|
|
251
253
|
$isDragging: isDragging,
|
|
252
254
|
$isDraggingDisabled: Boolean(ctx.state.searchValue),
|
|
253
255
|
$isDraggingOver: isDraggingOver,
|
|
254
256
|
$selected: isSelected,
|
|
255
|
-
"aria-posinset":
|
|
256
|
-
"aria-selected": ctx.state.activeMenuIndex ===
|
|
257
|
+
"aria-posinset": withSelectAllIndex,
|
|
258
|
+
"aria-selected": ctx.state.activeMenuIndex === withSelectAllIndex,
|
|
257
259
|
"aria-setsize": ctx.state.options.length || 0,
|
|
258
260
|
id: "item-".concat(value),
|
|
259
261
|
ref: setNode,
|
|
@@ -266,19 +268,108 @@ export var Item = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
266
268
|
checked: isSelected
|
|
267
269
|
})), children, ctx.config.selectionStyle === 'checkmark' && /*#__PURE__*/React.createElement(ctx.components.CheckmarkContainer, null, isSelected && /*#__PURE__*/React.createElement(ctx.components.Checkmark, null)));
|
|
268
270
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
|
|
272
|
+
// NOTE: SelectAll Implementation Details
|
|
273
|
+
// ====================================
|
|
274
|
+
// The team wanted wanted to keep the Item component fairly untouched and make SelectAll its own
|
|
275
|
+
// standalone component. This separation required modifications to several functions to ensure proper keyboard
|
|
276
|
+
// navigation and mouse hover behavior work seamlessly between SelectAll and the virtualized options.
|
|
277
|
+
//
|
|
278
|
+
// Key functions that were modified due to this separation:
|
|
279
|
+
// 1. allOptionsWithSelectAll - Creates combined list for navigation calculations
|
|
280
|
+
// 2. groupIndices - Adjusted to account for SelectAll at index 0
|
|
281
|
+
// 3. selectedIndex - Modified to reference absolute positions including SelectAll
|
|
282
|
+
// 4. selectedOption - Updated to search complete list including SelectAll
|
|
283
|
+
// 5. onKeyboardSelect - Uses combined list for proper option selection
|
|
284
|
+
// 6. navigationList.current length - Adjusted to include SelectAll in navigation array
|
|
285
|
+
// 7. virtuoso scrollIntoView - Index adjustment to handle SelectAll being rendered separately
|
|
286
|
+
// 8. SuperSelect.components.tsx SelectAll - Added onMouseMove handler for hover detection
|
|
287
|
+
// 9. SuperSelect.tsx itemContent - Index adjustment to prevent data-index conflicts
|
|
288
|
+
//
|
|
289
|
+
// Without these modifications, keyboard navigation would skip SelectAll, hover states wouldn't
|
|
290
|
+
// work properly, and there would be index mismatches between the navigation system and the
|
|
291
|
+
// actual rendered options.
|
|
292
|
+
export var SelectAll = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
293
|
+
var _props$dataKnownSiz2;
|
|
294
|
+
var children = _ref5.children,
|
|
295
|
+
_ref5$isDragging = _ref5.isDragging,
|
|
296
|
+
isDragging = _ref5$isDragging === void 0 ? false : _ref5$isDragging,
|
|
297
|
+
props = _objectWithoutProperties(_ref5, _excluded3);
|
|
298
|
+
var ctx = useSuperSelectContext();
|
|
299
|
+
var _React$useState3 = React.useState(0),
|
|
300
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
301
|
+
size = _React$useState4[0],
|
|
302
|
+
setSize = _React$useState4[1];
|
|
303
|
+
var knownSize = (_props$dataKnownSiz2 = props['data-known-size']) !== null && _props$dataKnownSiz2 !== void 0 ? _props$dataKnownSiz2 : 0;
|
|
304
|
+
|
|
305
|
+
// TODO: There is a conflict with data-index. The index for select all is 0
|
|
306
|
+
// and the first item in the options list is also 0. This causes DOM conflicts
|
|
307
|
+
// where two elements have the same data-index attribute, which can confuse
|
|
308
|
+
// the navigation system and cause hover/selection issues.
|
|
309
|
+
var index = props['data-index']; // Select all should always be index 0
|
|
310
|
+
var selectableOptions = ctx.state.options.filter(function (opt) {
|
|
311
|
+
return !ctx.option.isOptgroup(opt) && !ctx.option.isDisabled(opt);
|
|
312
|
+
});
|
|
313
|
+
var isSelected = ctx.option.selectAll.isSelectAllSelected(selectableOptions);
|
|
314
|
+
var isPartiallySelected = ctx.option.selectAll.isSelectAllPartiallySelected(selectableOptions);
|
|
315
|
+
var isDisabled = ctx.config.loading;
|
|
316
|
+
function setNode(node) {
|
|
317
|
+
if (ctx) {
|
|
318
|
+
ctx.refs.navigationList.current[index] = node;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
React.useEffect(function () {
|
|
322
|
+
setSize(function (prevSize) {
|
|
323
|
+
return knownSize === 0 ? prevSize : knownSize;
|
|
324
|
+
});
|
|
325
|
+
}, [knownSize]);
|
|
326
|
+
var handleClick = function handleClick() {
|
|
327
|
+
if (isSelected) {
|
|
328
|
+
ctx.state.setValue([]);
|
|
329
|
+
} else {
|
|
330
|
+
ctx.state.onSelect(ctx.state.selectAllOption);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
return /*#__PURE__*/React.createElement(StyledSelectAll, null, /*#__PURE__*/React.createElement(StyledItem, _extends({}, props, ctx.props.item({
|
|
334
|
+
onClick: handleClick,
|
|
335
|
+
onMouseMove: function onMouseMove(event) {
|
|
336
|
+
// Update the active menu index when hovering over SelectAll
|
|
337
|
+
if (ctx.state.activeMenuIndex !== index) {
|
|
338
|
+
ctx.state.setActiveMenuIndex(index);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}), {
|
|
342
|
+
$disabled: isDisabled,
|
|
343
|
+
$emptyMinHeight: size,
|
|
344
|
+
$highlighted: ctx.state.activeMenuIndex === index,
|
|
345
|
+
$selected: isSelected,
|
|
346
|
+
"aria-posinset": index,
|
|
347
|
+
"aria-selected": ctx.state.activeMenuIndex === index,
|
|
348
|
+
"aria-setsize": ctx.state.options.length || 0,
|
|
349
|
+
id: "item-".concat(ctx.state.selectAllOption.id),
|
|
350
|
+
ref: setNode,
|
|
351
|
+
role: "option"
|
|
352
|
+
}), ctx.config.selectionStyle === 'checkbox' && /*#__PURE__*/React.createElement(ctx.components.CheckboxContainer, null, isPartiallySelected && !isSelected ? /*#__PURE__*/React.createElement(ctx.components.Checkbox, {
|
|
353
|
+
disabled: isDisabled,
|
|
354
|
+
indeterminate: isPartiallySelected
|
|
355
|
+
}) : /*#__PURE__*/React.createElement(ctx.components.Checkbox, {
|
|
356
|
+
disabled: isDisabled,
|
|
357
|
+
checked: isSelected
|
|
358
|
+
})), children, ctx.config.selectionStyle === 'checkmark' && /*#__PURE__*/React.createElement(ctx.components.CheckmarkContainer, null, isSelected && /*#__PURE__*/React.createElement(ctx.components.Checkmark, null))));
|
|
359
|
+
});
|
|
360
|
+
export var OptionGroupHeader = function OptionGroupHeader(_ref6) {
|
|
361
|
+
var optgroup = _ref6.optgroup;
|
|
271
362
|
return /*#__PURE__*/React.createElement(StyledOptionGroupLabel, null, optgroup.label);
|
|
272
363
|
};
|
|
273
|
-
export var OptionLabel = function OptionLabel(
|
|
274
|
-
var option =
|
|
364
|
+
export var OptionLabel = function OptionLabel(_ref7) {
|
|
365
|
+
var option = _ref7.option;
|
|
275
366
|
var ctx = useSuperSelectContext();
|
|
276
367
|
return /*#__PURE__*/React.createElement(StyledItemLabel, {
|
|
277
368
|
$draggable: ctx.config.draggable
|
|
278
369
|
}, ctx.option.label(option));
|
|
279
370
|
};
|
|
280
|
-
export var OptionContent = function OptionContent(
|
|
281
|
-
var option =
|
|
371
|
+
export var OptionContent = function OptionContent(_ref8) {
|
|
372
|
+
var option = _ref8.option;
|
|
282
373
|
var ctx = useSuperSelectContext();
|
|
283
374
|
if (ctx.option.isOptgroup(option)) {
|
|
284
375
|
return /*#__PURE__*/React.createElement(ctx.components.OptionGroupHeader, {
|
|
@@ -289,9 +380,9 @@ export var OptionContent = function OptionContent(_ref7) {
|
|
|
289
380
|
option: option
|
|
290
381
|
});
|
|
291
382
|
};
|
|
292
|
-
export var DraggableOptionContent = function DraggableOptionContent(
|
|
293
|
-
var index =
|
|
294
|
-
option =
|
|
383
|
+
export var DraggableOptionContent = function DraggableOptionContent(_ref9) {
|
|
384
|
+
var index = _ref9.index,
|
|
385
|
+
option = _ref9.option;
|
|
295
386
|
var ctx = useSuperSelectContext();
|
|
296
387
|
var disabled = ctx.option.isDisabled(option);
|
|
297
388
|
var isOptgroup = ctx.option.isOptgroup(option);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperSelect.components.js","names":["Draggable","Check","Clear","ClearIcon","Grip","React","FakeCheckbox","Spinner","Token","Tooltip","Typeahead","OverflowObserver","colors","InternalDragDropContext","draggableOptionIdSymbol","StyledArrow","StyledArrowContainer","StyledArrowFill","StyledArrowOutline","StyledCheckboxContainer","StyledCheckmarkContainer","StyledClearIcon","StyledDraggableWrapper","StyledEmptyMessage","StyledFooter","StyledGrip","StyledGroup","StyledHeader","StyledIndicators","StyledItem","StyledItemLabel","StyledLabel","StyledMultiInput","StyledMultiInputContainer","StyledMultiValue","StyledMultiValueContainer","StyledOptionGroupLabel","StyledOptions","StyledOverlay","StyledSearchContainer","StyledTrigger","useSuperSelectContext","Overlay","forwardRef","props","ref","createElement","_extends","SingleTrigger","ctx","_ref","isOverflowingX","showTooltip","config","disabled","state","open","label","selectedLabel","placeholder","labelComponent","components","Label","hoverable","trigger","overlay","MultiTrigger","multiple","Array","isArray","value","_ctx$state$value","MultiValueContainer","map","val","j","option","sourceOptions","find","o","MultiValue","key","index","MultiInputContainer","MultiInput","multiInput","TriggerContainer","Trigger","searchRef","useRef","useEffect","_searchRef$current","current","focus","Indicators","hasValue","length","loading","Loading","ArrowContainer","Arrow","up","down","width","height","_ref2","_objectWithoutProperties","_excluded","$hoverable","color","size","_ref3","left","right","_ref3$width","_ref3$height","_ref3$border","border","outline","fill","concat","focusable","points","clear","variant","icon","tabIndex","children","focused","activeTokenIndex","Remove","tokenClear","SearchContainer","Search","Header","Footer","padding","EmptyMessage","emptyMessage","Options","menu","Group","item","role","Item","_ref4","_props$dataKnownSiz","_ref4$isDragging","isDragging","_excluded2","_React$useContext","useContext","isDraggingOver","_React$useState","useState","_React$useState2","_slicedToArray","setSize","knownSize","prevSize","options","isDisabled","isPartiallySelected","isSelected","isOptgroup","setNode","node","refs","navigationList","onClick","onSelect","$disabled","$emptyMinHeight","$highlighted","activeMenuIndex","$isDraggable","$isDragging","$isDraggingDisabled","Boolean","searchValue","$isDraggingOver","$selected","id","selectionStyle","CheckboxContainer","Checkbox","indeterminate","checked","CheckmarkContainer","Checkmark","OptionGroupHeader","_ref5","optgroup","OptionLabel","_ref6","$draggable","draggable","OptionContent","_ref7","DraggableOptionContent","_ref8","optionId","draggableId","isDragDisabled","provided","innerRef","draggableProps","dragHandleProps","DragHandle","gray45"],"sources":["../../src/SuperSelect/SuperSelect.components.tsx"],"sourcesContent":["import type { DraggableProvided } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { Check, Clear as ClearIcon, Grip } from '@procore/core-icons'\nimport type { ComponentProps } from 'react'\nimport React from 'react'\nimport { FakeCheckbox } from '../Checkbox/Checkbox'\nimport { Spinner } from '../Spinner/Spinner'\nimport { Token } from '../Token/Token'\nimport { Tooltip } from '../Tooltip/Tooltip'\nimport { Typeahead } from '../Typeahead/Typeahead'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { colors } from '../_styles/colors'\nimport { InternalDragDropContext } from './SuperSelect'\nimport { draggableOptionIdSymbol } from './SuperSelect.constants'\nimport {\n StyledArrow,\n StyledArrowContainer,\n StyledArrowFill,\n StyledArrowOutline,\n StyledCheckboxContainer,\n StyledCheckmarkContainer,\n StyledClearIcon,\n StyledDraggableWrapper,\n StyledEmptyMessage,\n StyledFooter,\n StyledGrip,\n StyledGroup,\n StyledHeader,\n StyledIndicators,\n StyledItem,\n StyledItemLabel,\n StyledLabel,\n StyledMultiInput,\n StyledMultiInputContainer,\n StyledMultiValue,\n StyledMultiValueContainer,\n StyledOptionGroupLabel,\n StyledOptions,\n StyledOverlay,\n StyledSearchContainer,\n StyledTrigger,\n} from './SuperSelect.styles'\nimport type {\n SuperSelectMenuItemProps,\n SuperSelectOption,\n} from './SuperSelect.types'\nimport { useSuperSelectContext } from './useSuperSelect'\n\nexport const Overlay = React.forwardRef<HTMLDivElement, any>((props, ref) => {\n return <StyledOverlay ref={ref} {...props} />\n})\n\nexport const SingleTrigger = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <OverflowObserver>\n {({ isOverflowingX, ref }) => {\n const showTooltip =\n !ctx.config.disabled && isOverflowingX && !ctx.state.open\n\n const label = ctx.state.selectedLabel || ctx.config.placeholder\n\n const labelComponent = (\n <ctx.components.Label {...props} ref={ref} hoverable={showTooltip} />\n )\n\n return (\n <Tooltip trigger={showTooltip ? 'hover' : 'none'} overlay={label}>\n {labelComponent}\n </Tooltip>\n )\n }}\n </OverflowObserver>\n )\n}\n\nexport const MultiTrigger = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n if (ctx.config.multiple && Array.isArray(ctx.state.value)) {\n return (\n <ctx.components.MultiValueContainer {...props}>\n {ctx.state.value?.map((val, j) => {\n const option: SuperSelectOption = ctx.state.sourceOptions.find(\n (o) => ctx.option.value(o) === val\n )\n\n return (\n option && (\n <ctx.components.MultiValue key={val} index={j} option={option} />\n )\n )\n })}\n <ctx.components.MultiInputContainer>\n <ctx.components.MultiInput {...ctx.props.multiInput()} />\n </ctx.components.MultiInputContainer>\n </ctx.components.MultiValueContainer>\n )\n }\n\n return null\n}\n\nexport const TriggerContainer = StyledTrigger as\n | React.ForwardRefExoticComponent<any>\n | React.FC<any>\n\nexport const Trigger = React.forwardRef<HTMLDivElement, any>((props, ref) => {\n const ctx = useSuperSelectContext()\n\n const searchRef = React.useRef<HTMLInputElement>(null)\n\n React.useEffect(() => {\n searchRef.current?.focus()\n }, [ctx.state.value])\n\n return (\n <ctx.components.TriggerContainer ref={ref} {...props}>\n {ctx.config.multiple ? (\n <ctx.components.MultiTrigger />\n ) : (\n <ctx.components.SingleTrigger />\n )}\n <ctx.components.Indicators />\n </ctx.components.TriggerContainer>\n )\n})\n\nexport const Indicators = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n const hasValue = Array.isArray(ctx.state.value)\n ? ctx.state.value.length > 0\n : ctx.state.value\n\n return (\n <StyledIndicators>\n {hasValue && <ctx.components.Clear />}\n {ctx.config.loading ? (\n <ctx.components.Loading />\n ) : (\n <ctx.components.ArrowContainer>\n <ctx.components.Arrow\n up={ctx.state.open}\n down={!ctx.state.open}\n width={8}\n height={4}\n />\n </ctx.components.ArrowContainer>\n )}\n </StyledIndicators>\n )\n}\n\nexport const Label = React.forwardRef<HTMLDivElement, { hoverable: boolean }>(\n ({ hoverable, ...props }, ref) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledLabel\n {...props}\n {...ctx.props.label()}\n ref={ref}\n $hoverable={hoverable}\n >\n {ctx.state.selectedLabel || ctx.config.placeholder}\n </StyledLabel>\n )\n }\n)\n\nexport const Loading = () => {\n return <Spinner color=\"blue50\" size=\"xs\" />\n}\n\nexport const ArrowContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledArrowContainer {...props} />\n}\n\nexport const Arrow = ({\n up,\n down,\n left,\n right,\n width = 12,\n height = 12,\n border = 0,\n}: any) => {\n let outline = ''\n let fill = ''\n\n if (up) {\n outline = `0,${height} ${width},${height} {width / 2},0`\n // prettier-ignore\n fill = `${border},${height} ${width - border},${height} ${width / 2},${border * 2}`\n } else if (down) {\n outline = `0,0 ${width},0 ${width / 2},${height}`\n // prettier-ignore\n fill = `${border},0 ${width - border},0 ${width / 2},${height - border * 2}`\n } else if (left) {\n outline = `${width},0 ${width},${height} 0,${height / 2}`\n // prettier-ignore\n fill = `${width},${border} ${width},${height - border} ${border * 2},${height / 2}`\n } else if (right) {\n outline = `0,0 0,${height} ${width},${height / 2}`\n // prettier-ignore\n fill = `0,${border} 0,${height - border} ${width - border * 2},${height / 2}`\n }\n\n return (\n <StyledArrow>\n <svg height={height} width={width} focusable=\"false\">\n {border > 0 && <StyledArrowOutline points={outline} />}\n <StyledArrowFill points={fill} />\n </svg>\n </StyledArrow>\n )\n}\n\nexport const Clear = () => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledClearIcon\n {...ctx.props.clear()}\n size=\"sm\"\n variant=\"tertiary\"\n disabled={ctx.config.disabled}\n icon={<ClearIcon />}\n tabIndex={-1} // TODO revisit this accessibility\n />\n )\n}\n\nexport const MultiInputContainer = (props: React.PropsWithChildren<{}>) => {\n return <StyledMultiInputContainer>{props.children}</StyledMultiInputContainer>\n}\n\nexport const MultiInput = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledMultiInput ref={ref} {...props} />\n }\n)\n\nexport const MultiValue = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledMultiValue>\n <Token focused={ctx.state.activeTokenIndex === props.index}>\n <Token.Label>{ctx.option.label(props.option)}</Token.Label>\n <Token.Remove {...ctx.props.tokenClear(props.index)} />\n </Token>\n </StyledMultiValue>\n )\n}\n\nexport const MultiValueContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledMultiValueContainer {...props} />\n}\n\nexport const SearchContainer = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledSearchContainer ref={ref} {...props} />\n }\n)\n\nexport const Search = (props: React.PropsWithChildren<any>) => {\n return <Typeahead {...props} />\n}\n\nexport const Header = (props: React.PropsWithChildren<any>) => {\n return <StyledHeader {...props} />\n}\n\nexport const Footer = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledFooter ref={ref} {...props} padding=\"md lg\" />\n }\n)\n\nexport const EmptyMessage = (props: any) => {\n return (\n <StyledEmptyMessage {...props}>{props.emptyMessage}</StyledEmptyMessage>\n )\n}\n\nexport const Options = (props: React.HTMLAttributes<HTMLDivElement>) => {\n const ctx = useSuperSelectContext()\n\n return <StyledOptions {...props} {...ctx.props.menu()} />\n}\n\nexport const Group = (props: React.PropsWithChildren<{}>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledGroup\n {...props}\n {...ctx.props.item()}\n role=\"separator\"\n aria-disabled\n />\n )\n}\n\nexport const Item = React.forwardRef<HTMLDivElement, SuperSelectMenuItemProps>(\n ({ children, isDragging = false, ...props }, ref) => {\n const ctx = useSuperSelectContext()\n const { isDraggingOver } = React.useContext(InternalDragDropContext)\n const [size, setSize] = React.useState(0)\n\n const knownSize = props['data-known-size'] ?? 0\n\n React.useEffect(() => {\n setSize((prevSize) => (knownSize === 0 ? prevSize : knownSize))\n }, [knownSize])\n\n const index = props['data-index']\n\n const option = ctx.state.options[index]\n\n if (!option) {\n return null\n }\n\n const isDisabled = ctx.option.isDisabled(option)\n const isPartiallySelected = ctx.option.isPartiallySelected(option)\n const isSelected = ctx.option.isSelected(option)\n const isOptgroup = ctx.option.isOptgroup(option)\n const value = ctx?.option.value(option)\n\n function setNode(node: HTMLElement | null) {\n if (ctx) {\n ctx.refs.navigationList.current[index] = node\n }\n }\n\n if (isOptgroup) {\n return <ctx.components.Group {...props}>{children}</ctx.components.Group>\n }\n\n return (\n <StyledItem\n {...props}\n {...ctx.props.item({\n onClick: () => ctx.state.onSelect(option),\n })}\n $disabled={ctx.option.isDisabled(option)}\n $emptyMinHeight={size}\n $highlighted={ctx.state.activeMenuIndex === index}\n $isDraggable={!isDisabled}\n $isDragging={isDragging}\n $isDraggingDisabled={Boolean(ctx.state.searchValue)}\n $isDraggingOver={isDraggingOver}\n $selected={isSelected}\n aria-posinset={index + 1}\n aria-selected={ctx.state.activeMenuIndex === index}\n aria-setsize={ctx.state.options.length || 0}\n id={`item-${value}`}\n ref={setNode}\n role=\"option\"\n >\n {ctx.config.selectionStyle === 'checkbox' && (\n <ctx.components.CheckboxContainer>\n {isPartiallySelected && !isSelected ? (\n <ctx.components.Checkbox\n disabled={isDisabled}\n indeterminate={isPartiallySelected}\n />\n ) : (\n <ctx.components.Checkbox\n disabled={isDisabled}\n checked={isSelected}\n />\n )}\n </ctx.components.CheckboxContainer>\n )}\n {children}\n {ctx.config.selectionStyle === 'checkmark' && (\n <ctx.components.CheckmarkContainer>\n {isSelected && <ctx.components.Checkmark />}\n </ctx.components.CheckmarkContainer>\n )}\n </StyledItem>\n )\n }\n)\n\nexport const OptionGroupHeader = ({ optgroup }: any) => {\n return <StyledOptionGroupLabel>{optgroup.label}</StyledOptionGroupLabel>\n}\n\nexport const OptionLabel = ({ option }: any) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledItemLabel $draggable={ctx.config.draggable}>\n {ctx.option.label(option)}\n </StyledItemLabel>\n )\n}\n\nexport const OptionContent = ({ option }: any) => {\n const ctx = useSuperSelectContext()\n\n if (ctx.option.isOptgroup(option)) {\n return <ctx.components.OptionGroupHeader optgroup={option} />\n }\n\n return <ctx.components.OptionLabel option={option} />\n}\n\nexport const DraggableOptionContent = ({ index, option }: any) => {\n const ctx = useSuperSelectContext()\n\n const disabled = ctx.option.isDisabled(option)\n const isOptgroup = ctx.option.isOptgroup(option)\n const optionId = isOptgroup ? option.id : option[draggableOptionIdSymbol]\n\n return (\n <Draggable\n draggableId={optionId}\n index={index}\n key={optionId}\n isDragDisabled={isOptgroup || disabled || Boolean(ctx.state.searchValue)}\n >\n {(provided: DraggableProvided) => {\n return (\n <StyledDraggableWrapper\n ref={provided.innerRef}\n {...provided.draggableProps}\n {...provided.dragHandleProps}\n >\n {!isOptgroup && <ctx.components.DragHandle />}\n <ctx.components.OptionContent index={index} option={option} />\n </StyledDraggableWrapper>\n )\n }}\n </Draggable>\n )\n}\n\nexport const DragHandle = (props: React.PropsWithChildren<any>) => {\n return (\n <StyledGrip {...props}>\n <Grip color={colors.gray45} />\n </StyledGrip>\n )\n}\n\nexport const CheckboxContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledCheckboxContainer {...props} />\n}\n\nexport const Checkbox = (\n props: React.PropsWithChildren<ComponentProps<typeof FakeCheckbox>>\n) => {\n return <FakeCheckbox {...props} />\n}\n\nexport const CheckmarkContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledCheckmarkContainer {...props} />\n}\n\nexport const Checkmark = (props: React.PropsWithChildren<any>) => {\n return <Check {...props} size=\"sm\" />\n}\n"],"mappings":";;;;;;;;;;;AACA,SAASA,SAAS,QAAQ,iEAAiE;AAC3F,SAASC,KAAK,EAAEC,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,qBAAqB;AAErE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,uBAAuB,QAAQ,eAAe;AACvD,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SACEC,WAAW,EACXC,oBAAoB,EACpBC,eAAe,EACfC,kBAAkB,EAClBC,uBAAuB,EACvBC,wBAAwB,EACxBC,eAAe,EACfC,sBAAsB,EACtBC,kBAAkB,EAClBC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EACfC,WAAW,EACXC,gBAAgB,EAChBC,yBAAyB,EACzBC,gBAAgB,EAChBC,yBAAyB,EACzBC,sBAAsB,EACtBC,aAAa,EACbC,aAAa,EACbC,qBAAqB,EACrBC,aAAa,QACR,sBAAsB;AAK7B,SAASC,qBAAqB,QAAQ,kBAAkB;AAExD,OAAO,IAAMC,OAAO,gBAAGrC,KAAK,CAACsC,UAAU,CAAsB,UAACC,KAAK,EAAEC,GAAG,EAAK;EAC3E,oBAAOxC,KAAA,CAAAyC,aAAA,CAACR,aAAa,EAAAS,QAAA;IAACF,GAAG,EAAEA;EAAI,GAAKD,KAAK,CAAG,CAAC;AAC/C,CAAC,CAAC;AAEF,OAAO,IAAMI,aAAa,GAAG,SAAhBA,aAAaA,CAAIJ,K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,CAAC;AAEjB,CAAC;AAED,OAAO,IAAMzB,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAI5I,KAAmC,EAAK;EACxE,oBAAOvC,KAAA,CAAAyC,aAAA,CAAC3B,uBAAuB,EAAKyB,KAAQ,CAAC;AAC/C,CAAC;AAED,OAAO,IAAM6I,QAAQ,GAAG,SAAXA,QAAQA,CACnB7I,KAAmE,EAChE;EACH,oBAAOvC,KAAA,CAAAyC,aAAA,CAACxC,YAAY,EAAKsC,KAAQ,CAAC;AACpC,CAAC;AAED,OAAO,IAAMgJ,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIhJ,KAAmC,EAAK;EACzE,oBAAOvC,KAAA,CAAAyC,aAAA,CAAC1B,wBAAwB,EAAKwB,KAAQ,CAAC;AAChD,CAAC;AAED,OAAO,IAAMiJ,SAAS,GAAG,SAAZA,SAASA,CAAIjJ,KAAmC,EAAK;EAChE,oBAAOvC,KAAA,CAAAyC,aAAA,CAAC7C,KAAK,EAAA8C,QAAA,KAAKH,KAAK;IAAEkE,IAAI,EAAC;EAAI,EAAE,CAAC;AACvC,CAAC"}
|
|
1
|
+
{"version":3,"file":"SuperSelect.components.js","names":["Draggable","Check","Clear","ClearIcon","Grip","React","FakeCheckbox","Spinner","Token","Tooltip","Typeahead","OverflowObserver","colors","InternalDragDropContext","draggableOptionIdSymbol","StyledArrow","StyledArrowContainer","StyledArrowFill","StyledArrowOutline","StyledCheckboxContainer","StyledCheckmarkContainer","StyledClearIcon","StyledDraggableWrapper","StyledEmptyMessage","StyledFooter","StyledGrip","StyledGroup","StyledHeader","StyledIndicators","StyledItem","StyledItemLabel","StyledLabel","StyledMultiInput","StyledMultiInputContainer","StyledMultiValue","StyledMultiValueContainer","StyledOptionGroupLabel","StyledOptions","StyledOverlay","StyledSearchContainer","StyledSelectAll","StyledTrigger","useSuperSelectContext","Overlay","forwardRef","props","ref","createElement","_extends","SingleTrigger","ctx","_ref","isOverflowingX","showTooltip","config","disabled","state","open","label","selectedLabel","placeholder","labelComponent","components","Label","hoverable","trigger","overlay","MultiTrigger","multiple","Array","isArray","value","_ctx$state$value","MultiValueContainer","map","val","j","option","sourceOptions","find","o","MultiValue","key","index","MultiInputContainer","MultiInput","multiInput","TriggerContainer","Trigger","searchRef","useRef","useEffect","_searchRef$current","current","focus","Indicators","hasValue","length","loading","Loading","ArrowContainer","Arrow","up","down","width","height","_ref2","_objectWithoutProperties","_excluded","$hoverable","color","size","_ref3","left","right","_ref3$width","_ref3$height","_ref3$border","border","outline","fill","concat","focusable","points","clear","variant","icon","tabIndex","children","focused","activeTokenIndex","Remove","tokenClear","SearchContainer","Search","Header","Footer","padding","EmptyMessage","emptyMessage","Options","menu","Group","item","role","Item","_ref4","_props$dataKnownSiz","_ref4$isDragging","isDragging","_excluded2","_React$useContext","useContext","isDraggingOver","_React$useState","useState","_React$useState2","_slicedToArray","setSize","knownSize","prevSize","withSelectAllIndex","selectAllEnabled","options","isDisabled","isPartiallySelected","isSelected","isOptgroup","setNode","node","refs","navigationList","onClick","onSelect","$disabled","$emptyMinHeight","$highlighted","activeMenuIndex","$isDraggable","$isDragging","$isDraggingDisabled","Boolean","searchValue","$isDraggingOver","$selected","id","selectionStyle","CheckboxContainer","Checkbox","indeterminate","checked","CheckmarkContainer","Checkmark","SelectAll","_ref5","_props$dataKnownSiz2","_ref5$isDragging","_excluded3","_React$useState3","_React$useState4","selectableOptions","filter","opt","selectAll","isSelectAllSelected","isSelectAllPartiallySelected","handleClick","setValue","selectAllOption","onMouseMove","event","setActiveMenuIndex","OptionGroupHeader","_ref6","optgroup","OptionLabel","_ref7","$draggable","draggable","OptionContent","_ref8","DraggableOptionContent","_ref9","optionId","draggableId","isDragDisabled","provided","innerRef","draggableProps","dragHandleProps","DragHandle","gray45"],"sources":["../../src/SuperSelect/SuperSelect.components.tsx"],"sourcesContent":["import type { DraggableProvided } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { Check, Clear as ClearIcon, Grip } from '@procore/core-icons'\nimport type { ComponentProps } from 'react'\nimport React from 'react'\nimport { FakeCheckbox } from '../Checkbox/Checkbox'\nimport { Spinner } from '../Spinner/Spinner'\nimport { Token } from '../Token/Token'\nimport { Tooltip } from '../Tooltip/Tooltip'\nimport { Typeahead } from '../Typeahead/Typeahead'\nimport { OverflowObserver } from '../_hooks/OverflowObserver'\nimport { colors } from '../_styles/colors'\nimport { InternalDragDropContext } from './SuperSelect'\nimport { draggableOptionIdSymbol } from './SuperSelect.constants'\nimport {\n StyledArrow,\n StyledArrowContainer,\n StyledArrowFill,\n StyledArrowOutline,\n StyledCheckboxContainer,\n StyledCheckmarkContainer,\n StyledClearIcon,\n StyledDraggableWrapper,\n StyledEmptyMessage,\n StyledFooter,\n StyledGrip,\n StyledGroup,\n StyledHeader,\n StyledIndicators,\n StyledItem,\n StyledItemLabel,\n StyledLabel,\n StyledMultiInput,\n StyledMultiInputContainer,\n StyledMultiValue,\n StyledMultiValueContainer,\n StyledOptionGroupLabel,\n StyledOptions,\n StyledOverlay,\n StyledSearchContainer,\n StyledSelectAll,\n StyledTrigger,\n} from './SuperSelect.styles'\nimport type {\n SuperSelectMenuItemProps,\n SuperSelectOption,\n} from './SuperSelect.types'\nimport { useSuperSelectContext } from './useSuperSelect'\n\nexport const Overlay = React.forwardRef<HTMLDivElement, any>((props, ref) => {\n return <StyledOverlay ref={ref} {...props} />\n})\n\nexport const SingleTrigger = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <OverflowObserver>\n {({ isOverflowingX, ref }) => {\n const showTooltip =\n !ctx.config.disabled && isOverflowingX && !ctx.state.open\n\n const label = ctx.state.selectedLabel || ctx.config.placeholder\n\n const labelComponent = (\n <ctx.components.Label {...props} ref={ref} hoverable={showTooltip} />\n )\n\n return (\n <Tooltip trigger={showTooltip ? 'hover' : 'none'} overlay={label}>\n {labelComponent}\n </Tooltip>\n )\n }}\n </OverflowObserver>\n )\n}\n\nexport const MultiTrigger = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n if (ctx.config.multiple && Array.isArray(ctx.state.value)) {\n return (\n <ctx.components.MultiValueContainer {...props}>\n {ctx.state.value?.map((val, j) => {\n const option: SuperSelectOption = ctx.state.sourceOptions.find(\n (o) => ctx.option.value(o) === val\n )\n\n return (\n option && (\n <ctx.components.MultiValue key={val} index={j} option={option} />\n )\n )\n })}\n <ctx.components.MultiInputContainer>\n <ctx.components.MultiInput {...ctx.props.multiInput()} />\n </ctx.components.MultiInputContainer>\n </ctx.components.MultiValueContainer>\n )\n }\n\n return null\n}\n\nexport const TriggerContainer = StyledTrigger as\n | React.ForwardRefExoticComponent<any>\n | React.FC<any>\n\nexport const Trigger = React.forwardRef<HTMLDivElement, any>((props, ref) => {\n const ctx = useSuperSelectContext()\n\n const searchRef = React.useRef<HTMLInputElement>(null)\n\n React.useEffect(() => {\n searchRef.current?.focus()\n }, [ctx.state.value])\n\n return (\n <ctx.components.TriggerContainer ref={ref} {...props}>\n {ctx.config.multiple ? (\n <ctx.components.MultiTrigger />\n ) : (\n <ctx.components.SingleTrigger />\n )}\n <ctx.components.Indicators />\n </ctx.components.TriggerContainer>\n )\n})\n\nexport const Indicators = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n const hasValue = Array.isArray(ctx.state.value)\n ? ctx.state.value.length > 0\n : ctx.state.value\n\n return (\n <StyledIndicators>\n {hasValue && <ctx.components.Clear />}\n {ctx.config.loading ? (\n <ctx.components.Loading />\n ) : (\n <ctx.components.ArrowContainer>\n <ctx.components.Arrow\n up={ctx.state.open}\n down={!ctx.state.open}\n width={8}\n height={4}\n />\n </ctx.components.ArrowContainer>\n )}\n </StyledIndicators>\n )\n}\n\nexport const Label = React.forwardRef<HTMLDivElement, { hoverable: boolean }>(\n ({ hoverable, ...props }, ref) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledLabel\n {...props}\n {...ctx.props.label()}\n ref={ref}\n $hoverable={hoverable}\n >\n {ctx.state.selectedLabel || ctx.config.placeholder}\n </StyledLabel>\n )\n }\n)\n\nexport const Loading = () => {\n return <Spinner color=\"blue50\" size=\"xs\" />\n}\n\nexport const ArrowContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledArrowContainer {...props} />\n}\n\nexport const Arrow = ({\n up,\n down,\n left,\n right,\n width = 12,\n height = 12,\n border = 0,\n}: any) => {\n let outline = ''\n let fill = ''\n\n if (up) {\n outline = `0,${height} ${width},${height} {width / 2},0`\n // prettier-ignore\n fill = `${border},${height} ${width - border},${height} ${width / 2},${border * 2}`\n } else if (down) {\n outline = `0,0 ${width},0 ${width / 2},${height}`\n // prettier-ignore\n fill = `${border},0 ${width - border},0 ${width / 2},${height - border * 2}`\n } else if (left) {\n outline = `${width},0 ${width},${height} 0,${height / 2}`\n // prettier-ignore\n fill = `${width},${border} ${width},${height - border} ${border * 2},${height / 2}`\n } else if (right) {\n outline = `0,0 0,${height} ${width},${height / 2}`\n // prettier-ignore\n fill = `0,${border} 0,${height - border} ${width - border * 2},${height / 2}`\n }\n\n return (\n <StyledArrow>\n <svg height={height} width={width} focusable=\"false\">\n {border > 0 && <StyledArrowOutline points={outline} />}\n <StyledArrowFill points={fill} />\n </svg>\n </StyledArrow>\n )\n}\n\nexport const Clear = () => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledClearIcon\n {...ctx.props.clear()}\n size=\"sm\"\n variant=\"tertiary\"\n disabled={ctx.config.disabled}\n icon={<ClearIcon />}\n tabIndex={-1} // TODO revisit this accessibility\n />\n )\n}\n\nexport const MultiInputContainer = (props: React.PropsWithChildren<{}>) => {\n return <StyledMultiInputContainer>{props.children}</StyledMultiInputContainer>\n}\n\nexport const MultiInput = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledMultiInput ref={ref} {...props} />\n }\n)\n\nexport const MultiValue = (props: React.PropsWithChildren<any>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledMultiValue>\n <Token focused={ctx.state.activeTokenIndex === props.index}>\n <Token.Label>{ctx.option.label(props.option)}</Token.Label>\n <Token.Remove {...ctx.props.tokenClear(props.index)} />\n </Token>\n </StyledMultiValue>\n )\n}\n\nexport const MultiValueContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledMultiValueContainer {...props} />\n}\n\nexport const SearchContainer = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledSearchContainer ref={ref} {...props} />\n }\n)\n\nexport const Search = (props: React.PropsWithChildren<any>) => {\n return <Typeahead {...props} />\n}\n\nexport const Header = (props: React.PropsWithChildren<any>) => {\n return <StyledHeader {...props} />\n}\n\nexport const Footer = React.forwardRef(\n (props: React.PropsWithChildren<any>, ref) => {\n return <StyledFooter ref={ref} {...props} padding=\"md lg\" />\n }\n)\n\nexport const EmptyMessage = (props: any) => {\n return (\n <StyledEmptyMessage {...props}>{props.emptyMessage}</StyledEmptyMessage>\n )\n}\n\nexport const Options = (props: React.HTMLAttributes<HTMLDivElement>) => {\n const ctx = useSuperSelectContext()\n\n return <StyledOptions {...props} {...ctx.props.menu()} />\n}\n\nexport const Group = (props: React.PropsWithChildren<{}>) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledGroup\n {...props}\n {...ctx.props.item()}\n role=\"separator\"\n aria-disabled\n />\n )\n}\n\nexport const Item = React.forwardRef<HTMLDivElement, SuperSelectMenuItemProps>(\n ({ children, isDragging = false, ...props }, ref) => {\n const ctx = useSuperSelectContext()\n const { isDraggingOver } = React.useContext(InternalDragDropContext)\n const [size, setSize] = React.useState(0)\n\n const knownSize = props['data-known-size'] ?? 0\n\n React.useEffect(() => {\n setSize((prevSize) => (knownSize === 0 ? prevSize : knownSize))\n }, [knownSize])\n\n const index = props['data-index']\n const withSelectAllIndex =\n ctx.config.selectAllEnabled && ctx.config.multiple ? index + 1 : index\n\n const option = ctx.state.options[index]\n\n if (!option) {\n return null\n }\n\n const isDisabled = ctx.option.isDisabled(option)\n const isPartiallySelected = ctx.option.isPartiallySelected(option)\n const isSelected = ctx.option.isSelected(option)\n const isOptgroup = ctx.option.isOptgroup(option)\n const value = ctx?.option.value(option)\n\n function setNode(node: HTMLElement | null) {\n if (ctx) {\n ctx.refs.navigationList.current[withSelectAllIndex] = node\n }\n }\n\n if (isOptgroup) {\n return <ctx.components.Group {...props}>{children}</ctx.components.Group>\n }\n\n return (\n <StyledItem\n {...props}\n {...ctx.props.item({\n onClick: () => ctx.state.onSelect(option),\n })}\n $disabled={ctx.option.isDisabled(option)}\n $emptyMinHeight={size}\n $highlighted={ctx.state.activeMenuIndex === withSelectAllIndex}\n $isDraggable={!isDisabled}\n $isDragging={isDragging}\n $isDraggingDisabled={Boolean(ctx.state.searchValue)}\n $isDraggingOver={isDraggingOver}\n $selected={isSelected}\n aria-posinset={withSelectAllIndex}\n aria-selected={ctx.state.activeMenuIndex === withSelectAllIndex}\n aria-setsize={ctx.state.options.length || 0}\n id={`item-${value}`}\n ref={setNode}\n role=\"option\"\n >\n {ctx.config.selectionStyle === 'checkbox' && (\n <ctx.components.CheckboxContainer>\n {isPartiallySelected && !isSelected ? (\n <ctx.components.Checkbox\n disabled={isDisabled}\n indeterminate={isPartiallySelected}\n />\n ) : (\n <ctx.components.Checkbox\n disabled={isDisabled}\n checked={isSelected}\n />\n )}\n </ctx.components.CheckboxContainer>\n )}\n {children}\n {ctx.config.selectionStyle === 'checkmark' && (\n <ctx.components.CheckmarkContainer>\n {isSelected && <ctx.components.Checkmark />}\n </ctx.components.CheckmarkContainer>\n )}\n </StyledItem>\n )\n }\n)\n\n// NOTE: SelectAll Implementation Details\n// ====================================\n// The team wanted wanted to keep the Item component fairly untouched and make SelectAll its own\n// standalone component. This separation required modifications to several functions to ensure proper keyboard\n// navigation and mouse hover behavior work seamlessly between SelectAll and the virtualized options.\n//\n// Key functions that were modified due to this separation:\n// 1. allOptionsWithSelectAll - Creates combined list for navigation calculations\n// 2. groupIndices - Adjusted to account for SelectAll at index 0\n// 3. selectedIndex - Modified to reference absolute positions including SelectAll\n// 4. selectedOption - Updated to search complete list including SelectAll\n// 5. onKeyboardSelect - Uses combined list for proper option selection\n// 6. navigationList.current length - Adjusted to include SelectAll in navigation array\n// 7. virtuoso scrollIntoView - Index adjustment to handle SelectAll being rendered separately\n// 8. SuperSelect.components.tsx SelectAll - Added onMouseMove handler for hover detection\n// 9. SuperSelect.tsx itemContent - Index adjustment to prevent data-index conflicts\n//\n// Without these modifications, keyboard navigation would skip SelectAll, hover states wouldn't\n// work properly, and there would be index mismatches between the navigation system and the\n// actual rendered options.\nexport const SelectAll = React.forwardRef<\n HTMLDivElement,\n SuperSelectMenuItemProps\n>(({ children, isDragging = false, ...props }, ref) => {\n const ctx = useSuperSelectContext()\n const [size, setSize] = React.useState(0)\n\n const knownSize = props['data-known-size'] ?? 0\n\n // TODO: There is a conflict with data-index. The index for select all is 0\n // and the first item in the options list is also 0. This causes DOM conflicts\n // where two elements have the same data-index attribute, which can confuse\n // the navigation system and cause hover/selection issues.\n const index = props['data-index'] // Select all should always be index 0\n const selectableOptions = ctx.state.options.filter((opt) => {\n return !ctx.option.isOptgroup(opt) && !ctx.option.isDisabled(opt)\n })\n const isSelected = ctx.option.selectAll.isSelectAllSelected(selectableOptions)\n const isPartiallySelected =\n ctx.option.selectAll.isSelectAllPartiallySelected(selectableOptions)\n\n const isDisabled = ctx.config.loading\n\n function setNode(node: HTMLElement | null) {\n if (ctx) {\n ctx.refs.navigationList.current[index] = node\n }\n }\n\n React.useEffect(() => {\n setSize((prevSize) => (knownSize === 0 ? prevSize : knownSize))\n }, [knownSize])\n\n const handleClick = () => {\n if (isSelected) {\n ctx.state.setValue([])\n } else {\n ctx.state.onSelect(ctx.state.selectAllOption)\n }\n }\n\n return (\n <StyledSelectAll>\n <StyledItem\n {...props}\n {...ctx.props.item({\n onClick: handleClick,\n onMouseMove: (event: React.MouseEvent<HTMLDivElement>) => {\n // Update the active menu index when hovering over SelectAll\n if (ctx.state.activeMenuIndex !== index) {\n ctx.state.setActiveMenuIndex(index)\n }\n },\n })}\n $disabled={isDisabled}\n $emptyMinHeight={size}\n $highlighted={ctx.state.activeMenuIndex === index}\n $selected={isSelected}\n aria-posinset={index}\n aria-selected={ctx.state.activeMenuIndex === index}\n aria-setsize={ctx.state.options.length || 0}\n id={`item-${ctx.state.selectAllOption.id}`}\n ref={setNode}\n role=\"option\"\n >\n {ctx.config.selectionStyle === 'checkbox' && (\n <ctx.components.CheckboxContainer>\n {isPartiallySelected && !isSelected ? (\n <ctx.components.Checkbox\n disabled={isDisabled}\n indeterminate={isPartiallySelected}\n />\n ) : (\n <ctx.components.Checkbox\n disabled={isDisabled}\n checked={isSelected}\n />\n )}\n </ctx.components.CheckboxContainer>\n )}\n {children}\n {ctx.config.selectionStyle === 'checkmark' && (\n <ctx.components.CheckmarkContainer>\n {isSelected && <ctx.components.Checkmark />}\n </ctx.components.CheckmarkContainer>\n )}\n </StyledItem>\n </StyledSelectAll>\n )\n})\n\nexport const OptionGroupHeader = ({ optgroup }: any) => {\n return <StyledOptionGroupLabel>{optgroup.label}</StyledOptionGroupLabel>\n}\n\nexport const OptionLabel = ({ option }: any) => {\n const ctx = useSuperSelectContext()\n\n return (\n <StyledItemLabel $draggable={ctx.config.draggable}>\n {ctx.option.label(option)}\n </StyledItemLabel>\n )\n}\n\nexport const OptionContent = ({ option }: any) => {\n const ctx = useSuperSelectContext()\n\n if (ctx.option.isOptgroup(option)) {\n return <ctx.components.OptionGroupHeader optgroup={option} />\n }\n\n return <ctx.components.OptionLabel option={option} />\n}\n\nexport const DraggableOptionContent = ({ index, option }: any) => {\n const ctx = useSuperSelectContext()\n\n const disabled = ctx.option.isDisabled(option)\n const isOptgroup = ctx.option.isOptgroup(option)\n const optionId = isOptgroup ? option.id : option[draggableOptionIdSymbol]\n\n return (\n <Draggable\n draggableId={optionId}\n index={index}\n key={optionId}\n isDragDisabled={isOptgroup || disabled || Boolean(ctx.state.searchValue)}\n >\n {(provided: DraggableProvided) => {\n return (\n <StyledDraggableWrapper\n ref={provided.innerRef}\n {...provided.draggableProps}\n {...provided.dragHandleProps}\n >\n {!isOptgroup && <ctx.components.DragHandle />}\n <ctx.components.OptionContent index={index} option={option} />\n </StyledDraggableWrapper>\n )\n }}\n </Draggable>\n )\n}\n\nexport const DragHandle = (props: React.PropsWithChildren<any>) => {\n return (\n <StyledGrip {...props}>\n <Grip color={colors.gray45} />\n </StyledGrip>\n )\n}\n\nexport const CheckboxContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledCheckboxContainer {...props} />\n}\n\nexport const Checkbox = (\n props: React.PropsWithChildren<ComponentProps<typeof FakeCheckbox>>\n) => {\n return <FakeCheckbox {...props} />\n}\n\nexport const CheckmarkContainer = (props: React.PropsWithChildren<any>) => {\n return <StyledCheckmarkContainer {...props} />\n}\n\nexport const Checkmark = (props: React.PropsWithChildren<any>) => {\n return <Check {...props} size=\"sm\" />\n}\n"],"mappings":";;;;;;;;;;;;AACA,SAASA,SAAS,QAAQ,iEAAiE;AAC3F,SAASC,KAAK,EAAEC,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,qBAAqB;AAErE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,uBAAuB,QAAQ,eAAe;AACvD,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SACEC,WAAW,EACXC,oBAAoB,EACpBC,eAAe,EACfC,kBAAkB,EAClBC,uBAAuB,EACvBC,wBAAwB,EACxBC,eAAe,EACfC,sBAAsB,EACtBC,kBAAkB,EAClBC,YAAY,EACZC,UAAU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EAAC;EAAI,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperSelect.constants.js","names":["isOptgroupSymbol","Symbol","draggableOptionIdSymbol"],"sources":["../../src/SuperSelect/SuperSelect.constants.ts"],"sourcesContent":["export const isOptgroupSymbol = Symbol('isOptgroup')\nexport const draggableOptionIdSymbol = Symbol()\n"],"mappings":"AAAA,OAAO,IAAMA,gBAAgB,GAAGC,MAAM,CAAC,YAAY,CAAC;AACpD,OAAO,IAAMC,
|
|
1
|
+
{"version":3,"file":"SuperSelect.constants.js","names":["isOptgroupSymbol","Symbol","isOptSelectAllSymbol","draggableOptionIdSymbol"],"sources":["../../src/SuperSelect/SuperSelect.constants.ts"],"sourcesContent":["export const isOptgroupSymbol = Symbol('isOptgroup')\nexport const isOptSelectAllSymbol = Symbol('isOptSelectAll')\nexport const draggableOptionIdSymbol = Symbol()\n"],"mappings":"AAAA,OAAO,IAAMA,gBAAgB,GAAGC,MAAM,CAAC,YAAY,CAAC;AACpD,OAAO,IAAMC,oBAAoB,GAAGD,MAAM,CAAC,gBAAgB,CAAC;AAC5D,OAAO,IAAME,uBAAuB,GAAGF,MAAM,CAAC,CAAC"}
|
|
@@ -56,7 +56,11 @@ function SelectComponent(props, ref) {
|
|
|
56
56
|
initialFocus: config.multiple ? undefined : 0
|
|
57
57
|
}, /*#__PURE__*/React.createElement(ctx.components.Overlay, _extends({
|
|
58
58
|
ref: ctx.refs.floating.refs.setFloating
|
|
59
|
-
}, ctx.props.overlay()), (config.search === true || config.search === undefined && !config.multiple) && /*#__PURE__*/React.createElement(ctx.components.SearchContainer, ctx.props.searchContainer(), /*#__PURE__*/React.createElement(ctx.components.Search, ctx.props.search())), config.header && /*#__PURE__*/React.createElement(ctx.components.Header, ctx.props.header(), config.header),
|
|
59
|
+
}, ctx.props.overlay()), (config.search === true || config.search === undefined && !config.multiple) && /*#__PURE__*/React.createElement(ctx.components.SearchContainer, ctx.props.searchContainer(), /*#__PURE__*/React.createElement(ctx.components.Search, ctx.props.search())), config.header && /*#__PURE__*/React.createElement(ctx.components.Header, ctx.props.header(), config.header), config.selectAllEnabled && config.multiple && /*#__PURE__*/React.createElement(ctx.components.SelectAll, {
|
|
60
|
+
"data-index": 0
|
|
61
|
+
}, /*#__PURE__*/React.createElement(OptionContent, {
|
|
62
|
+
option: ctx.state.selectAllOption
|
|
63
|
+
})), ctx.state.options.length > 0 ? /*#__PURE__*/React.createElement(ctx.components.Options, null, config.draggable ? /*#__PURE__*/React.createElement(DragDropContext, {
|
|
60
64
|
onDragEnd: ctx.state.onDragEnd
|
|
61
65
|
}, /*#__PURE__*/React.createElement(Droppable, {
|
|
62
66
|
droppableId: "droppable",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperSelect.js","names":["DragDropContext","Droppable","FloatingFocusManager","FloatingPortal","FocusScope","React","Virtuoso","presets","DraggableOptionContent","OptionContent","SuperSelectContext","useSuperSelect","InternalDragDropContext","createContext","isDraggingOver","InternalDragDropProvider","_ref","children","value","useMemo","createElement","Provider","SelectComponent","props","ref","search","undefined","preset","config","_objectSpread","ctx","useImperativeHandle","useEffect","onChange","console","warn","components","Trigger","_extends","refs","floating","setReference","trigger","state","open","context","order","initialFocus","multiple","Overlay","setFloating","overlay","SearchContainer","searchContainer","Search","header","Header","options","length","Options","draggable","onDragEnd","droppableId","mode","renderClone","provided","snapshot","dragged","option","source","index","Item","isDragging","draggableProps","DragHandle","OptionLabel","virtuoso","scrollerRef","el","innerRef","itemContent","i","data","EmptyMessage","emptyMessage","footer","Footer","SuperSelect","forwardRef"],"sources":["../../src/SuperSelect/SuperSelect.tsx"],"sourcesContent":["import type {\n DraggableProvided,\n DraggableRubric,\n DraggableStateSnapshot,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport {\n DragDropContext,\n Droppable,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'\nimport { FocusScope } from '@react-aria/focus'\nimport React from 'react'\nimport { Virtuoso } from 'react-virtuoso'\nimport { presets } from './presets'\nimport { DraggableOptionContent, OptionContent } from './SuperSelect.components'\nimport type {\n SuperSelectApi,\n SuperSelectConfig,\n SuperSelectProps,\n} from './SuperSelect.types'\nimport { SuperSelectContext, useSuperSelect } from './useSuperSelect'\n\nexport const InternalDragDropContext = React.createContext({\n isDraggingOver: false,\n})\n\nconst InternalDragDropProvider = ({\n isDraggingOver,\n children,\n}: {\n isDraggingOver: boolean\n children: React.ReactNode\n}) => {\n const value = React.useMemo(() => {\n return {\n isDraggingOver,\n }\n }, [isDraggingOver])\n\n return (\n <InternalDragDropContext.Provider value={value}>\n {children}\n </InternalDragDropContext.Provider>\n )\n}\n\nfunction SelectComponent(\n props: SuperSelectProps,\n ref: React.ForwardedRef<SuperSelectApi>\n) {\n const search = props.search === undefined || props.search === true\n\n const preset = props.preset || ''\n\n const config: SuperSelectConfig = {\n ...presets[preset],\n ...props,\n search,\n }\n\n const ctx = useSuperSelect(config)\n\n React.useImperativeHandle(ref, () => ctx)\n\n React.useEffect(() => {\n if (props.value && props.onChange === undefined) {\n console.warn(\n 'Must provide both a `value` and `onChange` prop for a controlled Select'\n )\n }\n }, [])\n\n return (\n <SuperSelectContext.Provider value={ctx}>\n <ctx.components.Trigger\n ref={ctx.refs.floating.refs.setReference}\n {...ctx.props.trigger()}\n />\n <FloatingPortal>\n {ctx.state.open && (\n // FocusScope is needed to allow move focus from Modal and Tearsheet\n <FocusScope>\n <FloatingFocusManager\n context={ctx.refs.floating.context}\n order={\n config.search\n ? ['content', 'reference']\n : ['reference', 'content']\n }\n initialFocus={config.multiple ? undefined : 0}\n >\n <ctx.components.Overlay\n ref={ctx.refs.floating.refs.setFloating}\n {...ctx.props.overlay()}\n >\n {(config.search === true ||\n (config.search === undefined && !config.multiple)) && (\n <ctx.components.SearchContainer\n {...ctx.props.searchContainer()}\n >\n <ctx.components.Search {...ctx.props.search()} />\n </ctx.components.SearchContainer>\n )}\n {config.header && (\n <ctx.components.Header {...ctx.props.header()}>\n {config.header}\n </ctx.components.Header>\n )}\n {ctx.state.options.length > 0 ? (\n <ctx.components.Options>\n {config.draggable ? (\n <DragDropContext onDragEnd={ctx.state.onDragEnd}>\n <Droppable\n droppableId=\"droppable\"\n mode=\"virtual\"\n renderClone={(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot,\n dragged: DraggableRubric\n ) => {\n const option =\n ctx.state.options[dragged.source.index]\n\n return (\n <ctx.components.Item\n isDragging\n data-index={dragged.source.index}\n {...provided.draggableProps}\n >\n <ctx.components.DragHandle />\n <ctx.components.OptionLabel option={option} />\n </ctx.components.Item>\n )\n }}\n >\n {(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot\n ) => {\n return (\n <InternalDragDropProvider\n isDraggingOver={snapshot.isDraggingOver}\n >\n <Virtuoso\n {...ctx.props.virtuoso()}\n scrollerRef={(el) =>\n provided.innerRef(el as HTMLElement)\n }\n itemContent={(i, data) => (\n <DraggableOptionContent\n index={i}\n option={data}\n />\n )}\n />\n </InternalDragDropProvider>\n )\n }}\n </Droppable>\n </DragDropContext>\n ) : (\n <Virtuoso\n {...ctx.props.virtuoso()}\n ref={ctx.refs.virtuoso}\n itemContent={(i, option) => (\n <OptionContent option={option} />\n )}\n />\n )}\n </ctx.components.Options>\n ) : (\n <ctx.components.EmptyMessage {...ctx.props.emptyMessage()} />\n )}\n {config.footer && (\n <ctx.components.Footer {...ctx.props.footer()}>\n {config.footer}\n </ctx.components.Footer>\n )}\n </ctx.components.Overlay>\n </FloatingFocusManager>\n </FocusScope>\n )}\n </FloatingPortal>\n </SuperSelectContext.Provider>\n )\n}\n\nexport const SuperSelect = React.forwardRef<SuperSelectApi, SuperSelectProps>(\n SelectComponent\n)\n"],"mappings":";;;;;;;AAKA,SACEA,eAAe,EACfC,SAAS,QACJ,iEAAiE;AACxE,SAASC,oBAAoB,EAAEC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M,EAAKxD,GAAG,CAACP,KAAK,CAAC8D,MAAM,CAAC,CAAC,EAC1CzD,MAAM,CAACyD,MACa,CAEH,CACJ,CACZ,CAEA,CACW,CAAC;AAElC;AAEA,OAAO,IAAME,WAAW,gBAAGlF,KAAK,CAACmF,UAAU,CACzClE,eACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"SuperSelect.js","names":["DragDropContext","Droppable","FloatingFocusManager","FloatingPortal","FocusScope","React","Virtuoso","presets","DraggableOptionContent","OptionContent","SuperSelectContext","useSuperSelect","InternalDragDropContext","createContext","isDraggingOver","InternalDragDropProvider","_ref","children","value","useMemo","createElement","Provider","SelectComponent","props","ref","search","undefined","preset","config","_objectSpread","ctx","useImperativeHandle","useEffect","onChange","console","warn","components","Trigger","_extends","refs","floating","setReference","trigger","state","open","context","order","initialFocus","multiple","Overlay","setFloating","overlay","SearchContainer","searchContainer","Search","header","Header","selectAllEnabled","SelectAll","option","selectAllOption","options","length","Options","draggable","onDragEnd","droppableId","mode","renderClone","provided","snapshot","dragged","source","index","Item","isDragging","draggableProps","DragHandle","OptionLabel","virtuoso","scrollerRef","el","innerRef","itemContent","i","data","EmptyMessage","emptyMessage","footer","Footer","SuperSelect","forwardRef"],"sources":["../../src/SuperSelect/SuperSelect.tsx"],"sourcesContent":["import type {\n DraggableProvided,\n DraggableRubric,\n DraggableStateSnapshot,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport {\n DragDropContext,\n Droppable,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'\nimport { FocusScope } from '@react-aria/focus'\nimport React from 'react'\nimport { Virtuoso } from 'react-virtuoso'\nimport { presets } from './presets'\nimport { DraggableOptionContent, OptionContent } from './SuperSelect.components'\nimport type {\n SuperSelectApi,\n SuperSelectConfig,\n SuperSelectProps,\n} from './SuperSelect.types'\nimport { SuperSelectContext, useSuperSelect } from './useSuperSelect'\n\nexport const InternalDragDropContext = React.createContext({\n isDraggingOver: false,\n})\n\nconst InternalDragDropProvider = ({\n isDraggingOver,\n children,\n}: {\n isDraggingOver: boolean\n children: React.ReactNode\n}) => {\n const value = React.useMemo(() => {\n return {\n isDraggingOver,\n }\n }, [isDraggingOver])\n\n return (\n <InternalDragDropContext.Provider value={value}>\n {children}\n </InternalDragDropContext.Provider>\n )\n}\n\nfunction SelectComponent(\n props: SuperSelectProps,\n ref: React.ForwardedRef<SuperSelectApi>\n) {\n const search = props.search === undefined || props.search === true\n\n const preset = props.preset || ''\n\n const config: SuperSelectConfig = {\n ...presets[preset],\n ...props,\n search,\n }\n\n const ctx = useSuperSelect(config)\n\n React.useImperativeHandle(ref, () => ctx)\n\n React.useEffect(() => {\n if (props.value && props.onChange === undefined) {\n console.warn(\n 'Must provide both a `value` and `onChange` prop for a controlled Select'\n )\n }\n }, [])\n\n return (\n <SuperSelectContext.Provider value={ctx}>\n <ctx.components.Trigger\n ref={ctx.refs.floating.refs.setReference}\n {...ctx.props.trigger()}\n />\n <FloatingPortal>\n {ctx.state.open && (\n // FocusScope is needed to allow move focus from Modal and Tearsheet\n <FocusScope>\n <FloatingFocusManager\n context={ctx.refs.floating.context}\n order={\n config.search\n ? ['content', 'reference']\n : ['reference', 'content']\n }\n initialFocus={config.multiple ? undefined : 0}\n >\n <ctx.components.Overlay\n ref={ctx.refs.floating.refs.setFloating}\n {...ctx.props.overlay()}\n >\n {(config.search === true ||\n (config.search === undefined && !config.multiple)) && (\n <ctx.components.SearchContainer\n {...ctx.props.searchContainer()}\n >\n <ctx.components.Search {...ctx.props.search()} />\n </ctx.components.SearchContainer>\n )}\n {config.header && (\n <ctx.components.Header {...ctx.props.header()}>\n {config.header}\n </ctx.components.Header>\n )}\n {config.selectAllEnabled && config.multiple && (\n <ctx.components.SelectAll data-index={0}>\n <OptionContent option={ctx.state.selectAllOption} />\n </ctx.components.SelectAll>\n )}\n {ctx.state.options.length > 0 ? (\n <ctx.components.Options>\n {config.draggable ? (\n <DragDropContext onDragEnd={ctx.state.onDragEnd}>\n <Droppable\n droppableId=\"droppable\"\n mode=\"virtual\"\n renderClone={(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot,\n dragged: DraggableRubric\n ) => {\n const option =\n ctx.state.options[dragged.source.index]\n\n return (\n <ctx.components.Item\n isDragging\n data-index={dragged.source.index}\n {...provided.draggableProps}\n >\n <ctx.components.DragHandle />\n <ctx.components.OptionLabel option={option} />\n </ctx.components.Item>\n )\n }}\n >\n {(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot\n ) => {\n return (\n <InternalDragDropProvider\n isDraggingOver={snapshot.isDraggingOver}\n >\n <Virtuoso\n {...ctx.props.virtuoso()}\n scrollerRef={(el) =>\n provided.innerRef(el as HTMLElement)\n }\n itemContent={(i, data) => (\n <DraggableOptionContent\n index={i}\n option={data}\n />\n )}\n />\n </InternalDragDropProvider>\n )\n }}\n </Droppable>\n </DragDropContext>\n ) : (\n <Virtuoso\n {...ctx.props.virtuoso()}\n ref={ctx.refs.virtuoso}\n itemContent={(i, option) => (\n <OptionContent option={option} />\n )}\n />\n )}\n </ctx.components.Options>\n ) : (\n <ctx.components.EmptyMessage {...ctx.props.emptyMessage()} />\n )}\n {config.footer && (\n <ctx.components.Footer {...ctx.props.footer()}>\n {config.footer}\n </ctx.components.Footer>\n )}\n </ctx.components.Overlay>\n </FloatingFocusManager>\n </FocusScope>\n )}\n </FloatingPortal>\n </SuperSelectContext.Provider>\n )\n}\n\nexport const SuperSelect = React.forwardRef<SuperSelectApi, SuperSelectProps>(\n SelectComponent\n)\n"],"mappings":";;;;;;;AAKA,SACEA,eAAe,EACfC,SAAS,QACJ,iEAAiE;AACxE,SAASC,oBAAoB,EAAEC,cAAc,QAAQ,oBAAoB;AACzE,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,OAAO,QAAQ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gE,YAAY,CAAC,CAAI,CAC7D,EACA3D,MAAM,CAAC4D,MAAM,iBACZnF,KAAA,CAAAe,aAAA,CAACU,GAAG,CAACM,UAAU,CAACqD,MAAM,EAAK3D,GAAG,CAACP,KAAK,CAACiE,MAAM,CAAC,CAAC,EAC1C5D,MAAM,CAAC4D,MACa,CAEH,CACJ,CACZ,CAEA,CACW,CAAC;AAElC;AAEA,OAAO,IAAME,WAAW,gBAAGrF,KAAK,CAACsF,UAAU,CACzCrE,eACF,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { Popover } from '../Popover';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledFilterPresetPopoverContent = /*#__PURE__*/styled(Popover.Content).withConfig({
|
|
5
5
|
displayName: "StyledFilterPresetPopoverContent",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_28_0__sc-y5qv7b-0"
|
|
7
7
|
})(["padding:", "px ", "px;"], spacing.sm, spacing.lg);
|
|
8
8
|
//# sourceMappingURL=SuperSelect.presets.styles.js.map
|
|
@@ -55,6 +55,9 @@ export declare const StyledItem: import("styled-components/dist/types").IStyledC
|
|
|
55
55
|
$isDraggingOver?: boolean | undefined;
|
|
56
56
|
$isDraggingDisabled?: boolean | undefined;
|
|
57
57
|
}>> & string;
|
|
58
|
+
export declare const StyledSelectAll: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
59
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
60
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
58
61
|
export declare const StyledDroppable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
59
62
|
export declare const StyledSelectMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("react").HTMLAttributes<HTMLDivElement> & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
60
63
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|