@economic/taco 2.37.2 → 2.38.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.
Files changed (22) hide show
  1. package/dist/components/Select2/Select2.d.ts +6 -1
  2. package/dist/components/Select2/components/Context.d.ts +3 -1
  3. package/dist/components/Select2/types.d.ts +3 -1
  4. package/dist/esm/packages/taco/src/components/Select2/Select2.js +9 -4
  5. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  6. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  7. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +35 -12
  8. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  9. package/dist/esm/packages/taco/src/components/Select2/utilities.js +1 -1
  10. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  11. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +3 -0
  12. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  13. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +15 -9
  14. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  15. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -0
  16. package/dist/primitives/Table/Core/components/Header/components/Resizer.d.ts +1 -0
  17. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  18. package/dist/taco.cjs.development.js +61 -26
  19. package/dist/taco.cjs.development.js.map +1 -1
  20. package/dist/taco.cjs.production.min.js +1 -1
  21. package/dist/taco.cjs.production.min.js.map +1 -1
  22. package/package.json +2 -2
@@ -5,6 +5,7 @@ declare type ResizerProps = {
5
5
  id: string;
6
6
  isResizing: boolean;
7
7
  onResize: (event: unknown) => void;
8
+ onResetSize: () => void;
8
9
  setColumnSizing: any;
9
10
  width?: TableColumnWidth;
10
11
  };
@@ -6,7 +6,7 @@ export declare type FilterColumnProps<TType = unknown> = Omit<Select2Props, 'chi
6
6
  allColumns: ReactTableColumn<TType, unknown>[];
7
7
  filters: TableFilter[];
8
8
  };
9
- export declare const FilterColumn: React.ForwardRefExoticComponent<Pick<Select2Props, "defaultValue" | "onChange" | "value" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "emptyValue" | "disabled" | "fontSize" | "highlighted" | "invalid" | "loading" | "multiple" | "name" | "onCreate" | "onDelete" | "onEdit" | "readOnly" | "required" | "tags"> & {
9
+ export declare const FilterColumn: React.ForwardRefExoticComponent<Pick<Select2Props, "defaultValue" | "onChange" | "value" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "emptyValue" | "disabled" | "fontSize" | "highlighted" | "invalid" | "loading" | "multiple" | "name" | "onCreate" | "onDelete" | "onEdit" | "readOnly" | "required" | "tags" | "createDialog" | "createTriggerText"> & {
10
10
  allColumns: ReactTableColumn<unknown, unknown>[];
11
11
  filters: TableFilter[];
12
12
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -12916,6 +12916,7 @@ function Resizer(props) {
12916
12916
  headerRef,
12917
12917
  id,
12918
12918
  isResizing,
12919
+ onResetSize,
12919
12920
  onResize,
12920
12921
  setColumnSizing,
12921
12922
  width
@@ -12930,16 +12931,21 @@ function Resizer(props) {
12930
12931
  };
12931
12932
  // columns set to "grow" don't set a width, so if resize is being triggered on a grow column make sure to set a size first
12932
12933
  const handleResize = event => {
12933
- if (!Number.isInteger(width) && headerRef) {
12934
- setColumnSizing(sizes => ({
12935
- ...sizes,
12936
- [id]: headerRef.getBoundingClientRect().width
12937
- }));
12938
- setTimeout(() => {
12939
- onResize === null || onResize === void 0 ? void 0 : onResize(event);
12940
- }, 1);
12934
+ // event.detail >= 2 means a user has clicked more than once quickly.
12935
+ if (event.detail >= 2) {
12936
+ onResetSize();
12941
12937
  } else {
12942
- onResize === null || onResize === void 0 ? void 0 : onResize(event);
12938
+ if (!Number.isInteger(width) && headerRef) {
12939
+ setColumnSizing(sizes => ({
12940
+ ...sizes,
12941
+ [id]: headerRef.getBoundingClientRect().width
12942
+ }));
12943
+ setTimeout(() => {
12944
+ onResize === null || onResize === void 0 ? void 0 : onResize(event);
12945
+ }, 1);
12946
+ } else {
12947
+ onResize === null || onResize === void 0 ? void 0 : onResize(event);
12948
+ }
12943
12949
  }
12944
12950
  };
12945
12951
  const handle = /*#__PURE__*/React__default.createElement("div", {
@@ -13315,6 +13321,7 @@ function Header$5(props) {
13315
13321
  if (canResize) {
13316
13322
  memoedProps.isResizing = header.column.getIsResizing();
13317
13323
  memoedProps.onResize = header.getResizeHandler();
13324
+ memoedProps.resetSize = header.column.resetSize;
13318
13325
  }
13319
13326
  if (canSort) {
13320
13327
  const handleSortToggle = sortDirection => {
@@ -13363,6 +13370,7 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
13363
13370
  onResize: handleResize,
13364
13371
  onSort: handleSort,
13365
13372
  onSortToggle: handleSortToggle,
13373
+ resetSize: handleResetSize,
13366
13374
  scrollToIndex,
13367
13375
  setRowActiveIndex,
13368
13376
  setColumnSizing,
@@ -13424,6 +13432,7 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
13424
13432
  id: id,
13425
13433
  isResizing: isResizing,
13426
13434
  onResize: handleResize,
13435
+ onResetSize: handleResetSize,
13427
13436
  setColumnSizing: setColumnSizing,
13428
13437
  width: width
13429
13438
  })) : null);
@@ -14607,7 +14616,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
14607
14616
  })) : null);
14608
14617
  });
14609
14618
 
14610
- const createOptionClassName = (shouldPauseHoverState = false) => cn('group mb-px flex w-full text-sm flex-shrink-0 font-normal cursor-pointer items-center rounded bg-white px-2 leading-8 text-black aria-hidden:hidden gap-1.5 bg-white aria-current:wcag-grey-200 aria-disabled:text-black/25 aria-disabled:pointer-events-none', {
14619
+ const createOptionClassName = (shouldPauseHoverState = false) => cn('group mb-px flex w-full text-sm flex-shrink-0 font-normal cursor-pointer items-center rounded bg-white px-2 leading-8 text-black aria-hidden:hidden gap-1.5 bg-white aria-current:wcag-grey-200 aria-disabled:text-black/25 aria-disabled:pointer-events-none !justify-normal', {
14611
14620
  'hover:wcag-grey-200': !shouldPauseHoverState
14612
14621
  });
14613
14622
  const createCollectionClassName = () => 'flex flex-col gap-px';
@@ -15420,20 +15429,25 @@ const Create = props => {
15420
15429
  setOpen,
15421
15430
  setSearchQuery,
15422
15431
  setValidationError,
15423
- setValue
15432
+ setValue,
15433
+ createDialog,
15434
+ createTriggerText
15424
15435
  } = useSelect2Context();
15425
15436
  const {
15426
15437
  texts
15427
15438
  } = useLocalization();
15428
15439
  // determine what the next color tag should be based on color occurences
15429
15440
  const nextColor = React__default.useMemo(() => getNextColor(options), [options]);
15430
- if (!searchQuery) {
15441
+ const onCreateDialogClose = React__default.useCallback(() => {
15442
+ setOpen(false);
15443
+ }, [setOpen]);
15444
+ if (!createDialog && !searchQuery) {
15431
15445
  return null;
15432
15446
  }
15433
- const handleClick = function () {
15447
+ const create = function (value) {
15434
15448
  try {
15435
15449
  const _temp = _catch(function () {
15436
- return Promise.resolve(handleCreate(searchQuery, nextColor)).then(function (item) {
15450
+ return Promise.resolve(handleCreate(value, nextColor)).then(function (item) {
15437
15451
  setValue(item.value);
15438
15452
  if (multiple) {
15439
15453
  setSearchQuery('');
@@ -15454,17 +15468,33 @@ const Create = props => {
15454
15468
  event.currentTarget.click();
15455
15469
  }
15456
15470
  };
15457
- const className = cn('!w-[calc(100%_-_theme(spacing.3))] ml-1.5', createOptionClassName());
15458
- return /*#__PURE__*/React__default.createElement("button", {
15459
- className: className,
15460
- onClick: handleClick,
15461
- onKeyDown: handleKeyDown
15462
- }, /*#__PURE__*/React__default.createElement("span", {
15471
+ const className = cn(createOptionClassName(), {
15472
+ '!w-[calc(100%_-_theme(spacing.3))] ml-1.5': !createDialog,
15473
+ 'leading-normal border-grey-300 h-9 border-t py-2.5 px-4 !-mb-1.5': !!createDialog
15474
+ });
15475
+ const creationOptions = createDialog ? {
15476
+ dialog: props => createDialog({
15477
+ ...props,
15478
+ onClose: onCreateDialogClose
15479
+ }, searchQuery, create)
15480
+ } : {
15481
+ onClick: () => create(searchQuery)
15482
+ };
15483
+ const createText = createTriggerText || texts.select2.create;
15484
+ return /*#__PURE__*/React__default.createElement(Button$1, Object.assign({
15485
+ className: className
15486
+ }, creationOptions, {
15487
+ onKeyDown: handleKeyDown,
15488
+ appearance: createDialog ? 'discrete' : 'default'
15489
+ }), /*#__PURE__*/React__default.createElement("span", {
15463
15490
  className: "flex items-center gap-1.5"
15464
- }, texts.select2.create, /*#__PURE__*/React__default.createElement(Tag$1, {
15491
+ }, createDialog ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, {
15492
+ className: "text-xs",
15493
+ name: "circle-plus"
15494
+ }), " ", createText)) : ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, createText, /*#__PURE__*/React__default.createElement(Tag$1, {
15465
15495
  color: nextColor,
15466
15496
  className: "cursor-pointer"
15467
- }, searchQuery)));
15497
+ }, searchQuery)))));
15468
15498
  };
15469
15499
 
15470
15500
  const Collection$1 = props => {
@@ -15497,6 +15527,8 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
15497
15527
  readOnly = false,
15498
15528
  tags = false,
15499
15529
  value: prop,
15530
+ createDialog,
15531
+ createTriggerText,
15500
15532
  ...otherProps
15501
15533
  } = props;
15502
15534
  const emptyOption = React__default.useMemo(() => {
@@ -15576,7 +15608,9 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
15576
15608
  tags,
15577
15609
  fontSize,
15578
15610
  validationError,
15579
- value
15611
+ value,
15612
+ createDialog,
15613
+ createTriggerText
15580
15614
  };
15581
15615
  const handleKeyDown = event => {
15582
15616
  var _listboxRef$current;
@@ -15661,7 +15695,8 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
15661
15695
  setValue(nextValue);
15662
15696
  }
15663
15697
  };
15664
- const className = cn('border-grey-300 rounded border bg-white py-1.5 shadow-md outline-none"', createCollectionClassName());
15698
+ const className = cn('border-grey-300 rounded border bg-white py-1.5 shadow-md outline-none', createCollectionClassName());
15699
+ const isInlineCreation = onCreate && !createDialog;
15665
15700
  return /*#__PURE__*/React__default.createElement(Select2Context.Provider, {
15666
15701
  value: context
15667
15702
  }, /*#__PURE__*/React__default.createElement(PopoverPrimitive.Root, {
@@ -15692,8 +15727,8 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
15692
15727
  style: {
15693
15728
  minWidth: dimensions !== null && dimensions !== void 0 && dimensions.width ? `${dimensions.width}px` : undefined
15694
15729
  }
15695
- }, flattenedChildren.length > 0 || onCreate ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Search$2, {
15696
- placeholder: onCreate ? texts.select2.searchOrCreate : texts.select2.search,
15730
+ }, flattenedChildren.length > 0 || isInlineCreation ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Search$2, {
15731
+ placeholder: isInlineCreation ? texts.select2.searchOrCreate : texts.select2.search,
15697
15732
  ref: searchRef,
15698
15733
  onTabKeyPress: () => setTabTriggeredClose(true)
15699
15734
  }), multiple && selectOptions.length > 1 && ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Button$1, {