@mw-kit/mw-ui 1.6.0 → 1.6.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Row: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<import("./interfaces").RowProps, "children" | "dir" | "slot" | "style" | "title" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "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" | "onChange" | "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" | "spacing" | "manifest" | "
|
|
1
|
+
export declare const Row: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<import("./interfaces").RowProps, "children" | "dir" | "slot" | "style" | "title" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "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" | "onChange" | "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" | "spacing" | "manifest" | "borderless" | "backgroundColor" | "fontColor" | "spacingAround" | "hover" | "horizontalAlign" | "verticalAlign" | "striped">, never>;
|
|
@@ -24,6 +24,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
24
24
|
type?: 'text' | 'number' | 'search' | 'email' | 'url' | 'PASSWORD';
|
|
25
25
|
width?: string;
|
|
26
26
|
arrows?: boolean;
|
|
27
|
+
borderless?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
29
30
|
required: 1 | 0;
|
|
@@ -38,4 +39,5 @@ export interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelEle
|
|
|
38
39
|
export interface StyledInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'required'> {
|
|
39
40
|
invalid: 1 | 0;
|
|
40
41
|
arrows: 1 | 0;
|
|
42
|
+
borderless: 1 | 0;
|
|
41
43
|
}
|
package/dist/index.js
CHANGED
|
@@ -12193,7 +12193,7 @@ var AbsoluteContainer = React__default.forwardRef(function (props, fowardedRef)
|
|
|
12193
12193
|
var y = top * 100 / height;
|
|
12194
12194
|
|
|
12195
12195
|
if (axis === 'y') {
|
|
12196
|
-
var xDirection = x > center.x ? '
|
|
12196
|
+
var xDirection = x > center.x ? 'right' : 'left';
|
|
12197
12197
|
var yDirection = y > center.y ? 'top' : 'bottom';
|
|
12198
12198
|
var newPosition = xDirection + " " + yDirection;
|
|
12199
12199
|
return newPosition;
|
|
@@ -12635,7 +12635,9 @@ var Input = styled__default.input(_templateObject3$a || (_templateObject3$a = _t
|
|
|
12635
12635
|
return theme.spacings.s2 + " " + theme.spacings.s3;
|
|
12636
12636
|
}, function (_ref9) {
|
|
12637
12637
|
var theme = _ref9.theme,
|
|
12638
|
-
invalid = _ref9.invalid
|
|
12638
|
+
invalid = _ref9.invalid,
|
|
12639
|
+
borderless = _ref9.borderless;
|
|
12640
|
+
if (borderless) return 'transparent';
|
|
12639
12641
|
return invalid ? theme.colors.warningRed : theme.colors.lightGrey;
|
|
12640
12642
|
}, function (_ref10) {
|
|
12641
12643
|
var theme = _ref10.theme,
|
|
@@ -12708,13 +12710,15 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12708
12710
|
onPressEnter = _props.onPressEnter,
|
|
12709
12711
|
htmlDisabled = _props.htmlDisabled,
|
|
12710
12712
|
width = _props.width,
|
|
12711
|
-
arrows = _props.arrows
|
|
12713
|
+
arrows = _props.arrows,
|
|
12714
|
+
borderless = _props.borderless;
|
|
12712
12715
|
|
|
12713
12716
|
var mask = getMask(props.mask);
|
|
12714
12717
|
var intInvalid = invalid ? 1 : 0;
|
|
12715
12718
|
var intRequired = required ? 1 : 0;
|
|
12716
12719
|
var intDisabled = disabled ? 1 : 0;
|
|
12717
12720
|
var intArrows = arrows ? 1 : 0;
|
|
12721
|
+
var intBorderless = borderless ? 1 : 0;
|
|
12718
12722
|
var position;
|
|
12719
12723
|
var iconWidth;
|
|
12720
12724
|
var iconSubmit;
|
|
@@ -12730,10 +12734,11 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12730
12734
|
iconOnClick = props.icon.onClick;
|
|
12731
12735
|
}
|
|
12732
12736
|
|
|
12733
|
-
var inputProps = filterObject(props, ['label', 'invalid', 'required', 'icon', 'mask', 'loading', 'clearable', 'setValue', 'onPressEnter', 'htmlDisabled', 'width', 'arrows'], {
|
|
12737
|
+
var inputProps = filterObject(props, ['label', 'invalid', 'required', 'icon', 'mask', 'loading', 'clearable', 'setValue', 'onPressEnter', 'htmlDisabled', 'width', 'arrows', 'borderless'], {
|
|
12734
12738
|
invalid: intInvalid,
|
|
12735
12739
|
type: 'text',
|
|
12736
|
-
arrows: intArrows
|
|
12740
|
+
arrows: intArrows,
|
|
12741
|
+
borderless: intBorderless
|
|
12737
12742
|
});
|
|
12738
12743
|
|
|
12739
12744
|
var onChange = inputProps.onChange || function () {};
|
|
@@ -15268,14 +15273,14 @@ var DatePicker$1 = React__default.forwardRef(function (props, ref) {
|
|
|
15268
15273
|
};
|
|
15269
15274
|
|
|
15270
15275
|
React.useEffect(function () {
|
|
15271
|
-
if (min && max && min > max) {
|
|
15276
|
+
if (props.min && props.max && props.min > props.max) {
|
|
15272
15277
|
throw Error('Min prop must be less than Max');
|
|
15273
15278
|
}
|
|
15274
15279
|
|
|
15275
15280
|
if (props.value.some(function (v) {
|
|
15276
15281
|
return v === '';
|
|
15277
15282
|
})) {
|
|
15278
|
-
setValue(intervalTypes.day.initial(min));
|
|
15283
|
+
setValue(intervalTypes.day.initial(props.min));
|
|
15279
15284
|
return;
|
|
15280
15285
|
}
|
|
15281
15286
|
|
|
@@ -15283,14 +15288,14 @@ var DatePicker$1 = React__default.forwardRef(function (props, ref) {
|
|
|
15283
15288
|
|
|
15284
15289
|
if (value.some(function (v) {
|
|
15285
15290
|
return !isDateInstance(v);
|
|
15286
|
-
}) || !validate(value, min, max)) {
|
|
15287
|
-
setValue(intervalTypes.day.initial(min));
|
|
15291
|
+
}) || !validate(value, props.min, props.max)) {
|
|
15292
|
+
setValue(intervalTypes.day.initial(props.min));
|
|
15288
15293
|
return;
|
|
15289
15294
|
}
|
|
15290
15295
|
|
|
15291
15296
|
var newIntervalType = identify(value);
|
|
15292
15297
|
setIntervalType(newIntervalType);
|
|
15293
|
-
}, [props.value, min, max]);
|
|
15298
|
+
}, [props.value, props.min, props.max]);
|
|
15294
15299
|
var inputProps = filterObject(props, ['min', 'max']);
|
|
15295
15300
|
|
|
15296
15301
|
var getArrowProps = function getArrowProps(key) {
|
|
@@ -15374,17 +15379,17 @@ var DatePicker$1 = React__default.forwardRef(function (props, ref) {
|
|
|
15374
15379
|
options: [{
|
|
15375
15380
|
label: 'Hoje',
|
|
15376
15381
|
onClick: function onClick() {
|
|
15377
|
-
return setValue(intervalTypes.day.initial(min));
|
|
15382
|
+
return setValue(intervalTypes.day.initial(props.min));
|
|
15378
15383
|
}
|
|
15379
15384
|
}, {
|
|
15380
15385
|
label: 'Semana',
|
|
15381
15386
|
onClick: function onClick() {
|
|
15382
|
-
return setValue(intervalTypes.week.initial(min));
|
|
15387
|
+
return setValue(intervalTypes.week.initial(props.min));
|
|
15383
15388
|
}
|
|
15384
15389
|
}, {
|
|
15385
15390
|
label: 'Mês',
|
|
15386
15391
|
onClick: function onClick() {
|
|
15387
|
-
return setValue(intervalTypes.month.initial(min));
|
|
15392
|
+
return setValue(intervalTypes.month.initial(props.min));
|
|
15388
15393
|
}
|
|
15389
15394
|
}, {
|
|
15390
15395
|
label: 'Personalizado',
|
|
@@ -15410,8 +15415,8 @@ var DatePicker$1 = React__default.forwardRef(function (props, ref) {
|
|
|
15410
15415
|
setOpen(null);
|
|
15411
15416
|
}
|
|
15412
15417
|
},
|
|
15413
|
-
min: min,
|
|
15414
|
-
max: max,
|
|
15418
|
+
min: props.min,
|
|
15419
|
+
max: props.max,
|
|
15415
15420
|
references: {
|
|
15416
15421
|
bottom: '35px'
|
|
15417
15422
|
},
|