@7shifts/sous-chef 2.8.1 → 2.8.2
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/dist/core/DataTableRow/DataTableRow.d.ts +2 -2
- package/dist/index.js +27 -21
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +27 -21
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,6 @@ declare type Props = {
|
|
|
6
6
|
isSelected?: boolean;
|
|
7
7
|
actions?: Action[];
|
|
8
8
|
hasDefaultPadding?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const DataTableRow: React.
|
|
9
|
+
} & React.HTMLProps<HTMLDivElement>;
|
|
10
|
+
declare const DataTableRow: React.ForwardRefExoticComponent<Pick<Props, "children" | "type" | "default" | "disabled" | "onClick" | "id" | "title" | "href" | "target" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "key" | "contextMenu" | "list" | "className" | "start" | "wrap" | "dir" | "checked" | "onChange" | "name" | "value" | "onBlur" | "placeholder" | "prefix" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "size" | "open" | "multiple" | "aria-label" | "aria-labelledby" | "autoFocus" | "onFocus" | "onKeyDown" | "tabIndex" | "defaultValue" | "isSelected" | "actions" | "hasDefaultPadding" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "lang" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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-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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "css"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export default DataTableRow;
|
package/dist/index.js
CHANGED
|
@@ -3346,7 +3346,9 @@ var useDataTableContext = function useDataTableContext() {
|
|
|
3346
3346
|
|
|
3347
3347
|
var styles$9 = {"item":"_1d8Ci","selected":"_3tb7U","clickable":"_thFcO","item-column":"_OTcMc","item-column--default-padding":"_lNHQ8","item-column--right-align":"_13YLe","item-column--vertical-border":"_1rrRr","actions":"_azbIG"};
|
|
3348
3348
|
|
|
3349
|
-
var
|
|
3349
|
+
var _excluded$2 = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding"];
|
|
3350
|
+
|
|
3351
|
+
var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
3350
3352
|
var _classnames;
|
|
3351
3353
|
|
|
3352
3354
|
var children = _ref.children,
|
|
@@ -3356,7 +3358,8 @@ var DataTableRow = function DataTableRow(_ref) {
|
|
|
3356
3358
|
_ref$actions = _ref.actions,
|
|
3357
3359
|
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
3358
3360
|
_ref$hasDefaultPaddin = _ref.hasDefaultPadding,
|
|
3359
|
-
hasDefaultPadding = _ref$hasDefaultPaddin === void 0 ? true : _ref$hasDefaultPaddin
|
|
3361
|
+
hasDefaultPadding = _ref$hasDefaultPaddin === void 0 ? true : _ref$hasDefaultPaddin,
|
|
3362
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
3360
3363
|
|
|
3361
3364
|
var _useDataTableContext = useDataTableContext(),
|
|
3362
3365
|
columns = _useDataTableContext.columns,
|
|
@@ -3380,13 +3383,14 @@ var DataTableRow = function DataTableRow(_ref) {
|
|
|
3380
3383
|
}, columnElement);
|
|
3381
3384
|
};
|
|
3382
3385
|
|
|
3383
|
-
return React__default.createElement("div", {
|
|
3386
|
+
return React__default.createElement("div", Object.assign({}, nativeDivProps, {
|
|
3384
3387
|
className: styleNames,
|
|
3385
3388
|
onClick: onClick ? onClick : undefined,
|
|
3386
3389
|
onKeyPress: onClick ? onClick : undefined,
|
|
3387
3390
|
"data-testid": "data-table-row",
|
|
3388
|
-
role: "row"
|
|
3389
|
-
|
|
3391
|
+
role: "row",
|
|
3392
|
+
ref: ref
|
|
3393
|
+
}), React__default.Children.map(children, function (child, index) {
|
|
3390
3394
|
return renderColumn(child, index);
|
|
3391
3395
|
}), showActionMenu && React__default.createElement("div", {
|
|
3392
3396
|
className: classnames(styles$9['item-column'], styles$9['actions']),
|
|
@@ -3399,6 +3403,8 @@ var DataTableRow = function DataTableRow(_ref) {
|
|
|
3399
3403
|
})))));
|
|
3400
3404
|
};
|
|
3401
3405
|
|
|
3406
|
+
var DataTableRow = React.forwardRef(DataTableRowComponent);
|
|
3407
|
+
|
|
3402
3408
|
var styles$a = {"header":"_of22N","header-item":"_27x4v","header-item--sortable":"_3gw3Z","header-item--right-align":"_Fjm2n","header-item--action":"_LoIvx","header-sort-icon":"_3VjFP","body":"_1bTmd","footer":"_1opWx","pagination-controls":"_F_spz"};
|
|
3403
3409
|
|
|
3404
3410
|
var SORT_ORDER$1 = {
|
|
@@ -4321,12 +4327,12 @@ var useTextField = function useTextField(_ref) {
|
|
|
4321
4327
|
};
|
|
4322
4328
|
};
|
|
4323
4329
|
|
|
4324
|
-
var _excluded$
|
|
4330
|
+
var _excluded$3 = ["prefix", "suffix"];
|
|
4325
4331
|
|
|
4326
4332
|
var TextFieldElement = function TextFieldElement(_ref, ref) {
|
|
4327
4333
|
var prefix = _ref.prefix,
|
|
4328
4334
|
suffix = _ref.suffix,
|
|
4329
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4335
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
4330
4336
|
|
|
4331
4337
|
var _useTextField = useTextField(_extends({}, props, {
|
|
4332
4338
|
ref: ref
|
|
@@ -4949,12 +4955,12 @@ var getSelectStyles$1 = function getSelectStyles(_ref) {
|
|
|
4949
4955
|
};
|
|
4950
4956
|
};
|
|
4951
4957
|
|
|
4952
|
-
var _excluded$
|
|
4958
|
+
var _excluded$4 = ["children", "CustomComponent"];
|
|
4953
4959
|
|
|
4954
4960
|
function CustomOption(_ref) {
|
|
4955
4961
|
var children = _ref.children,
|
|
4956
4962
|
CustomComponent = _ref.CustomComponent,
|
|
4957
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4963
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
4958
4964
|
|
|
4959
4965
|
return React__default.createElement(Select.components.Option, Object.assign({}, props), React__default.createElement(CustomComponent, Object.assign({}, props), children));
|
|
4960
4966
|
}
|
|
@@ -5056,14 +5062,14 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
5056
5062
|
|
|
5057
5063
|
var styles$q = {"custom-control":"_1cDCR"};
|
|
5058
5064
|
|
|
5059
|
-
var _excluded$
|
|
5065
|
+
var _excluded$5 = ["children", "CustomPrefixComponent"];
|
|
5060
5066
|
|
|
5061
5067
|
function CustomControl(_ref) {
|
|
5062
5068
|
var _props$getValue;
|
|
5063
5069
|
|
|
5064
5070
|
var children = _ref.children,
|
|
5065
5071
|
CustomPrefixComponent = _ref.CustomPrefixComponent,
|
|
5066
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5072
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
5067
5073
|
|
|
5068
5074
|
var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
|
|
5069
5075
|
return React__default.createElement(Select.components.Control, Object.assign({}, props), CustomControl && selectedOption ? React__default.createElement("div", {
|
|
@@ -5080,12 +5086,12 @@ function CustomControl(_ref) {
|
|
|
5080
5086
|
}, props)), children)) : children);
|
|
5081
5087
|
}
|
|
5082
5088
|
|
|
5083
|
-
var _excluded$
|
|
5089
|
+
var _excluded$6 = ["children", "CustomComponent"];
|
|
5084
5090
|
|
|
5085
5091
|
function CustomOption$1(_ref) {
|
|
5086
5092
|
var children = _ref.children,
|
|
5087
5093
|
CustomComponent = _ref.CustomComponent,
|
|
5088
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5094
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
5089
5095
|
|
|
5090
5096
|
return React__default.createElement(Select.components.Option, Object.assign({}, props), React__default.createElement(CustomComponent, Object.assign({}, props), children));
|
|
5091
5097
|
}
|
|
@@ -5897,14 +5903,14 @@ var WeekField = function WeekField(_ref) {
|
|
|
5897
5903
|
})));
|
|
5898
5904
|
};
|
|
5899
5905
|
|
|
5900
|
-
var _excluded$
|
|
5906
|
+
var _excluded$7 = ["placeholder", "autoComplete"];
|
|
5901
5907
|
|
|
5902
5908
|
var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
5903
5909
|
var _ref$placeholder = _ref.placeholder,
|
|
5904
5910
|
placeholder = _ref$placeholder === void 0 ? '9am' : _ref$placeholder,
|
|
5905
5911
|
_ref$autoComplete = _ref.autoComplete,
|
|
5906
5912
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
5907
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5913
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
5908
5914
|
|
|
5909
5915
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
5910
5916
|
placeholder: placeholder,
|
|
@@ -5925,12 +5931,12 @@ var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
|
5925
5931
|
|
|
5926
5932
|
var TimeField = React.forwardRef(TimeFieldElement);
|
|
5927
5933
|
|
|
5928
|
-
var _excluded$
|
|
5934
|
+
var _excluded$8 = ["currencySymbol"];
|
|
5929
5935
|
|
|
5930
5936
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
5931
5937
|
var _ref$currencySymbol = _ref.currencySymbol,
|
|
5932
5938
|
currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
|
|
5933
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5939
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
5934
5940
|
|
|
5935
5941
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
5936
5942
|
ref: ref
|
|
@@ -5963,7 +5969,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
|
5963
5969
|
|
|
5964
5970
|
var CurrencyField = React.forwardRef(CurrencyFieldElement);
|
|
5965
5971
|
|
|
5966
|
-
var _excluded$
|
|
5972
|
+
var _excluded$9 = ["max", "min", "precision", "stepSize"];
|
|
5967
5973
|
|
|
5968
5974
|
var PercentageElement = function PercentageElement(_ref, ref) {
|
|
5969
5975
|
var _ref$max = _ref.max,
|
|
@@ -5974,7 +5980,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
|
|
|
5974
5980
|
precision = _ref$precision === void 0 ? 0 : _ref$precision,
|
|
5975
5981
|
_ref$stepSize = _ref.stepSize,
|
|
5976
5982
|
stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
|
|
5977
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5983
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
5978
5984
|
|
|
5979
5985
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
5980
5986
|
ref: ref
|
|
@@ -6227,7 +6233,7 @@ var FooterContainer = function FooterContainer(_ref2) {
|
|
|
6227
6233
|
|
|
6228
6234
|
var styles$z = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
6229
6235
|
|
|
6230
|
-
var _excluded$
|
|
6236
|
+
var _excluded$a = ["children", "theme", "title"];
|
|
6231
6237
|
|
|
6232
6238
|
var Badge = function Badge(_ref, forwardedRef) {
|
|
6233
6239
|
var _classnames;
|
|
@@ -6235,7 +6241,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
6235
6241
|
var children = _ref.children,
|
|
6236
6242
|
theme = _ref.theme,
|
|
6237
6243
|
title = _ref.title,
|
|
6238
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6244
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
6239
6245
|
|
|
6240
6246
|
var internalRef = React.useRef(null);
|
|
6241
6247
|
var ref = forwardedRef || internalRef;
|