@economic/taco 2.27.0 → 2.27.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Select2/Select2.d.ts +4 -4
- package/dist/components/Select2/components/Trigger.d.ts +0 -1
- package/dist/components/Select2/utilities.d.ts +1 -2
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +5 -6
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js +5 -6
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +17 -17
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/utilities.js +1 -2
- package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +6 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
- package/dist/taco.cjs.development.js +34 -31
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
@@ -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" | "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"> & {
|
10
10
|
allColumns: ReactTableColumn<unknown, unknown>[];
|
11
11
|
filters: TableFilter[];
|
12
12
|
} & React.RefAttributes<HTMLButtonElement>>;
|
@@ -9345,13 +9345,18 @@ function ensureOrdering(columns, settingsOrder, internalColumnsPinnedToTheRight
|
|
9345
9345
|
});
|
9346
9346
|
});
|
9347
9347
|
if (settingsOrder && settingsOrder.length > 0) {
|
9348
|
+
const columnsAbsentInSettingsOrder = [];
|
9348
9349
|
orderingEnabled = orderingEnabled.reduce((acc, column) => {
|
9349
9350
|
const index = settingsOrder.indexOf(column);
|
9350
9351
|
if (index > -1) {
|
9351
9352
|
acc[index] = column;
|
9353
|
+
} else {
|
9354
|
+
columnsAbsentInSettingsOrder.push(column);
|
9352
9355
|
}
|
9353
9356
|
return acc;
|
9354
|
-
}, []).filter(column => !!column)
|
9357
|
+
}, []).filter(column => !!column)
|
9358
|
+
// Append absent columns at the end
|
9359
|
+
.concat(columnsAbsentInSettingsOrder);
|
9355
9360
|
}
|
9356
9361
|
const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];
|
9357
9362
|
// actions should always be last, enforce that
|
@@ -13892,10 +13897,9 @@ const getFontSize = fontSize => {
|
|
13892
13897
|
switch (fontSize) {
|
13893
13898
|
case exports.FontSizes.small:
|
13894
13899
|
return 'text-xs';
|
13895
|
-
case exports.FontSizes.medium:
|
13896
|
-
return 'text-sm';
|
13897
13900
|
case exports.FontSizes.large:
|
13898
13901
|
return 'text-base';
|
13902
|
+
case exports.FontSizes.medium:
|
13899
13903
|
default:
|
13900
13904
|
return 'text-sm';
|
13901
13905
|
}
|
@@ -14100,18 +14104,18 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
14100
14104
|
...otherProps
|
14101
14105
|
} = props;
|
14102
14106
|
const {
|
14103
|
-
|
14104
|
-
onEdit,
|
14107
|
+
fontSize,
|
14105
14108
|
listboxRef,
|
14106
14109
|
multiple,
|
14110
|
+
onDelete,
|
14111
|
+
onEdit,
|
14107
14112
|
ref: selectRef,
|
14108
14113
|
setOpen,
|
14109
14114
|
shouldPauseHoverState,
|
14110
14115
|
tags,
|
14111
|
-
value
|
14112
|
-
fontSize = exports.FontSizes.medium
|
14116
|
+
value
|
14113
14117
|
} = useSelect2Context();
|
14114
|
-
const className = cn(createOptionClassName(shouldPauseHoverState),
|
14118
|
+
const className = cn(createOptionClassName(shouldPauseHoverState), getFontSize(fontSize), cName);
|
14115
14119
|
const hasValue = Array.isArray(value) ? !!value.length : value !== undefined;
|
14116
14120
|
const isTag = tags && !!color;
|
14117
14121
|
const handleClick = () => {
|
@@ -14205,6 +14209,15 @@ const Title$5 = /*#__PURE__*/React__default.forwardRef(function Select2Title(pro
|
|
14205
14209
|
}));
|
14206
14210
|
});
|
14207
14211
|
|
14212
|
+
const Placeholder = ({
|
14213
|
+
disabled,
|
14214
|
+
...props
|
14215
|
+
}) => ( /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
14216
|
+
className: cn({
|
14217
|
+
'text-grey-700': disabled,
|
14218
|
+
'text-grey-500': !disabled
|
14219
|
+
})
|
14220
|
+
})));
|
14208
14221
|
const Trigger$7 = /*#__PURE__*/React__default.forwardRef(function Select2Trigger(props, ref) {
|
14209
14222
|
const {
|
14210
14223
|
multiple,
|
@@ -14228,11 +14241,11 @@ const Button$2 = /*#__PURE__*/React__default.forwardRef(function Select2TriggerB
|
|
14228
14241
|
children,
|
14229
14242
|
onClick,
|
14230
14243
|
tabIndex = 0,
|
14231
|
-
fontSize,
|
14232
14244
|
...otherProps
|
14233
14245
|
} = props;
|
14234
14246
|
const {
|
14235
14247
|
disabled,
|
14248
|
+
fontSize,
|
14236
14249
|
highlighted,
|
14237
14250
|
invalid,
|
14238
14251
|
open,
|
@@ -14244,7 +14257,7 @@ const Button$2 = /*#__PURE__*/React__default.forwardRef(function Select2TriggerB
|
|
14244
14257
|
highlighted,
|
14245
14258
|
invalid,
|
14246
14259
|
readOnly
|
14247
|
-
}).replace('w-full', '').replace('px-2', ''),
|
14260
|
+
}).replace('w-full', '').replace('px-2', ''), getFontSize(fontSize), {
|
14248
14261
|
'w-full': !((_props$className = props.className) !== null && _props$className !== void 0 && _props$className.includes('w-'))
|
14249
14262
|
}, props.className);
|
14250
14263
|
const handleClick = event => {
|
@@ -14288,11 +14301,8 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
14288
14301
|
const currentValue = children.find(matchesValue(value));
|
14289
14302
|
let output;
|
14290
14303
|
if (placeholder && currentValue === undefined) {
|
14291
|
-
output = /*#__PURE__*/React__default.createElement(
|
14292
|
-
|
14293
|
-
'text-grey-700': disabled,
|
14294
|
-
'text-grey-500': !disabled
|
14295
|
-
})
|
14304
|
+
output = /*#__PURE__*/React__default.createElement(Placeholder, {
|
14305
|
+
disabled: disabled
|
14296
14306
|
}, placeholder);
|
14297
14307
|
} else if (currentValue) {
|
14298
14308
|
if (tags && emptyValue !== value) {
|
@@ -14344,11 +14354,8 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
14344
14354
|
className: "my-1 flex max-h-[5.5rem] flex-col"
|
14345
14355
|
}, /*#__PURE__*/React__default.createElement("div", {
|
14346
14356
|
className: "flex flex-wrap gap-1"
|
14347
|
-
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(
|
14348
|
-
|
14349
|
-
'text-grey-700': disabled,
|
14350
|
-
'text-grey-500': !disabled
|
14351
|
-
})
|
14357
|
+
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(Placeholder, {
|
14358
|
+
disabled: disabled
|
14352
14359
|
}, placeholder)) : valuesAsChildren.map(child => ( /*#__PURE__*/React__default.createElement(Tag$1, {
|
14353
14360
|
key: String(child.props.value),
|
14354
14361
|
className: "truncate",
|
@@ -14407,11 +14414,8 @@ const MultipleValue = ({
|
|
14407
14414
|
}, /*#__PURE__*/React__default.createElement("div", {
|
14408
14415
|
className: "flex gap-1 truncate",
|
14409
14416
|
ref: el => setContentRef(el)
|
14410
|
-
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(
|
14411
|
-
|
14412
|
-
'text-grey-700': disabled,
|
14413
|
-
'text-grey-500': !disabled
|
14414
|
-
})
|
14417
|
+
}, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement(Placeholder, {
|
14418
|
+
disabled: disabled
|
14415
14419
|
}, placeholder)) : valuesAsChildren.map((child, index) => {
|
14416
14420
|
const tag = /*#__PURE__*/React__default.createElement(Tag$1, {
|
14417
14421
|
key: String(child.props.value),
|
@@ -14740,20 +14744,20 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
14740
14744
|
defaultValue: defaultProp,
|
14741
14745
|
disabled = false,
|
14742
14746
|
emptyValue = undefined,
|
14743
|
-
|
14747
|
+
fontSize,
|
14744
14748
|
highlighted = false,
|
14745
14749
|
invalid = false,
|
14750
|
+
loading,
|
14746
14751
|
multiple = false,
|
14747
14752
|
name,
|
14748
14753
|
onChange,
|
14749
14754
|
onCreate,
|
14750
14755
|
onDelete,
|
14751
14756
|
onEdit,
|
14757
|
+
placeholder,
|
14752
14758
|
readOnly = false,
|
14753
14759
|
tags = false,
|
14754
14760
|
value: prop,
|
14755
|
-
fontSize,
|
14756
|
-
loading,
|
14757
14761
|
...otherProps
|
14758
14762
|
} = props;
|
14759
14763
|
const emptyOption = React__default.useMemo(() => {
|
@@ -14938,9 +14942,8 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
14938
14942
|
emptyValue: emptyValue,
|
14939
14943
|
onBlur: handleBlur,
|
14940
14944
|
onKeyDown: handleKeyDown,
|
14941
|
-
|
14942
|
-
|
14943
|
-
placeholder: placeholder
|
14945
|
+
placeholder: placeholder,
|
14946
|
+
ref: internalRef
|
14944
14947
|
}), flattenedChildren)), /*#__PURE__*/React__default.createElement(PopoverPrimitive.Portal, null, /*#__PURE__*/React__default.createElement(PopoverPrimitive.Content, {
|
14945
14948
|
asChild: true,
|
14946
14949
|
align: "start",
|