@macive/ui 0.0.12 → 0.0.13
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/src/components/Input/Input.classnames.js +30 -3
- package/dist/src/components/Input/Input.js +29 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/components/Input/Input.classnames.d.ts +30 -3
- package/dist/types/src/components/Input/Input.classnames.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +70 -31
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/ui.min.css +2 -2
- package/package.json +1 -1
- package/dist/src/components/Icon/Icon.styles.js +0 -29
- package/dist/src/components/Modal/Modal.styles.js +0 -7
- package/dist/types/src/components/Icon/Icon.styles.d.ts +0 -28
- package/dist/types/src/components/Icon/Icon.styles.d.ts.map +0 -1
- package/dist/types/src/components/Modal/Modal.styles.d.ts +0 -6
- package/dist/types/src/components/Modal/Modal.styles.d.ts.map +0 -1
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
declare const InputClassnames: {
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
|
|
2
|
+
"Backdrop-connectedLeft": string;
|
|
3
|
+
"Backdrop-connectedRight": string;
|
|
4
|
+
TextField: string;
|
|
5
|
+
ClearButton: string;
|
|
6
|
+
multiline: string;
|
|
7
|
+
Input: string;
|
|
8
|
+
hasValue: string;
|
|
9
|
+
focus: string;
|
|
10
|
+
VerticalContent: string;
|
|
11
|
+
Backdrop: string;
|
|
12
|
+
error: string;
|
|
13
|
+
readOnly: string;
|
|
14
|
+
disabled: string;
|
|
15
|
+
Prefix: string;
|
|
16
|
+
suggestion: string;
|
|
17
|
+
borderless: string;
|
|
18
|
+
"Input-hasClearButton": string;
|
|
19
|
+
"Input-suffixed": string;
|
|
20
|
+
"Input-alignRight": string;
|
|
21
|
+
"Input-alignLeft": string;
|
|
22
|
+
"Input-alignCenter": string;
|
|
23
|
+
Suffix: string;
|
|
24
|
+
CharacterCount: string;
|
|
25
|
+
AlignFieldBottom: string;
|
|
26
|
+
Spinner: string;
|
|
27
|
+
SpinnerIcon: string;
|
|
28
|
+
Resizer: string;
|
|
29
|
+
DummyInput: string;
|
|
30
|
+
Segment: string;
|
|
31
|
+
monospaced: string;
|
|
5
32
|
};
|
|
6
33
|
export default InputClassnames;
|
|
7
34
|
//# sourceMappingURL=Input.classnames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.classnames.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.classnames.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"Input.classnames.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.classnames.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,36 +1,75 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Error } from '../../typos';
|
|
3
|
+
import type { LabelledProps } from '../Labelled';
|
|
4
|
+
type Type = 'text' | 'email' | 'number' | 'integer' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
5
|
+
type Alignment = 'left' | 'center' | 'right';
|
|
6
|
+
interface NonMutuallyExclusiveProps {
|
|
7
|
+
/** Text to display before value */
|
|
8
|
+
prefix?: React.ReactNode;
|
|
9
|
+
/** Text to display after value */
|
|
9
10
|
suffix?: React.ReactNode;
|
|
11
|
+
/** Content to vertically display above the input value */
|
|
12
|
+
verticalContent?: React.ReactNode;
|
|
13
|
+
/** Label for the input */
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
/** Adds an action to the label */
|
|
16
|
+
labelAction?: LabelledProps['action'];
|
|
17
|
+
/** Visually hide the label */
|
|
18
|
+
labelHidden?: boolean;
|
|
19
|
+
/** Disable the input */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Show a clear text button in the input */
|
|
22
|
+
clearButton?: boolean;
|
|
23
|
+
/** An inline autocomplete suggestion containing the input value. The characters that complete the input value are selected for ease of deletion on input change or keypress of Backspace/Delete. The selected substring is visually highlighted with subdued styling. */
|
|
24
|
+
suggestion?: string;
|
|
25
|
+
/** Disable editing of the input */
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
/** Automatically focus the input */
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
/** Force the focus state on the input */
|
|
30
|
+
focused?: boolean;
|
|
31
|
+
/** Error to display beneath the label */
|
|
32
|
+
error?: Error | boolean;
|
|
33
|
+
/** An element connected to the right of the input */
|
|
34
|
+
connectedRight?: React.ReactNode;
|
|
35
|
+
/** An element connected to the left of the input */
|
|
36
|
+
connectedLeft?: React.ReactNode;
|
|
37
|
+
/** Name of the input */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** ID for the input */
|
|
40
|
+
id?: string;
|
|
41
|
+
/** Defines a specific role attribute for the input */
|
|
42
|
+
role?: string;
|
|
43
|
+
/** Enable automatic completion by the browser. Set to "off" when you do not want the browser to fill in info */
|
|
44
|
+
autoComplete?: string;
|
|
45
|
+
/** Mimics the behavior of the native HTML attribute, limiting the maximum value */
|
|
46
|
+
max?: number | string;
|
|
47
|
+
/** Maximum character length for an input */
|
|
48
|
+
maxLength?: number;
|
|
49
|
+
/** Mimics the behavior of the native HTML attribute, limiting the minimum value */
|
|
50
|
+
min?: number | string;
|
|
51
|
+
/** Indicates whether or not the character count should be displayed */
|
|
52
|
+
showCharacterCount?: boolean;
|
|
53
|
+
/** Determines the alignment of the text in the input */
|
|
54
|
+
align?: Alignment;
|
|
55
|
+
/** Visual required indicator, adds an asterisk to label */
|
|
56
|
+
requiredIndicator?: boolean;
|
|
57
|
+
/** Indicates whether or not a monospaced font should be used */
|
|
58
|
+
monospaced?: boolean;
|
|
59
|
+
/** Callback fired when clear button is clicked */
|
|
60
|
+
onClearButtonClick?(id: string): void;
|
|
61
|
+
/** Removes the border around the input. Used in the IndexFilters component. */
|
|
62
|
+
borderless?: boolean;
|
|
63
|
+
/** Determine type of input */
|
|
64
|
+
type?: Type;
|
|
65
|
+
/** Hint text to display */
|
|
66
|
+
placeholder?: string;
|
|
67
|
+
/** Initial value for the input */
|
|
68
|
+
value?: string;
|
|
69
|
+
/** Additional hint text to display */
|
|
70
|
+
helpText?: React.ReactNode;
|
|
10
71
|
ref?: React.Ref<HTMLInputElement>;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the input is invalid.
|
|
13
|
-
*/
|
|
14
|
-
invalid?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* the input label
|
|
17
|
-
*/
|
|
18
|
-
label?: string;
|
|
19
|
-
/**
|
|
20
|
-
* class name for the native input
|
|
21
|
-
*/
|
|
22
|
-
/**error message when the input field is invalid */
|
|
23
|
-
error?: string;
|
|
24
|
-
variant?: any;
|
|
25
|
-
info?: ReactNode | string;
|
|
26
|
-
gap?: 'none';
|
|
27
72
|
}
|
|
28
|
-
|
|
29
|
-
* A simple input component.
|
|
30
|
-
*
|
|
31
|
-
* @param props InputProps for the component.
|
|
32
|
-
* @returns A React functional component.
|
|
33
|
-
*/
|
|
34
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<InputProps, "error" | "id" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "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" | "children" | "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" | "onResize" | "onResizeCapture" | "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" | "size" | "value" | "list" | "step" | "info" | "disabled" | "type" | "height" | "width" | "gap" | "invalid" | "variant" | "src" | "alt" | "max" | "accept" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "suffix" | "preffix" | "enterKeyHint"> & React.RefAttributes<HTMLInputElement>>;
|
|
73
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<NonMutuallyExclusiveProps, "error" | "id" | "label" | "placeholder" | "role" | "prefix" | "value" | "disabled" | "type" | "focused" | "align" | "max" | "autoComplete" | "autoFocus" | "maxLength" | "min" | "name" | "readOnly" | "helpText" | "suffix" | "requiredIndicator" | "labelHidden" | "verticalContent" | "labelAction" | "clearButton" | "connectedRight" | "connectedLeft" | "showCharacterCount" | "monospaced" | "suggestion" | "onClearButtonClick" | "borderless"> & React.RefAttributes<HTMLInputElement>>;
|
|
35
74
|
export {};
|
|
36
75
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAIxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,KAAK,IAAI,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,UA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