no-frills-ui 0.0.12 → 0.0.14-alpha.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.
- package/dist/index.js +2860 -2939
- package/dist/index.js.map +1 -1
- package/lib-esm/components/Accordion/Accordion.d.ts +2 -2
- package/lib-esm/components/Accordion/Accordion.js +8 -7
- package/lib-esm/components/Accordion/Accordion.js.map +1 -1
- package/lib-esm/components/Accordion/AccordionStep.d.ts +10 -5
- package/lib-esm/components/Accordion/AccordionStep.js +3 -12
- package/lib-esm/components/Accordion/AccordionStep.js.map +1 -1
- package/lib-esm/components/Badge/Badge.d.ts +5 -3
- package/lib-esm/components/Badge/Badge.js +9 -3
- package/lib-esm/components/Badge/Badge.js.map +1 -1
- package/lib-esm/components/Button/ActionButton.d.ts +4 -2
- package/lib-esm/components/Button/Button.d.ts +4 -2
- package/lib-esm/components/Button/IconButton.d.ts +4 -2
- package/lib-esm/components/Button/LinkButton.d.ts +4 -2
- package/lib-esm/components/Button/RaisedButton.d.ts +4 -2
- package/lib-esm/components/Card/Card.d.ts +4 -2
- package/lib-esm/components/Card/index.d.ts +1 -0
- package/lib-esm/components/Card/index.js +1 -0
- package/lib-esm/components/Card/index.js.map +1 -1
- package/lib-esm/components/Chip/Chip.d.ts +6 -0
- package/lib-esm/components/Chip/Chip.js +47 -0
- package/lib-esm/components/Chip/Chip.js.map +1 -0
- package/lib-esm/components/Chip/index.d.ts +1 -0
- package/lib-esm/components/Chip/index.js +2 -0
- package/lib-esm/components/Chip/index.js.map +1 -0
- package/lib-esm/components/Dialog/AlertDialog.d.ts +3 -3
- package/lib-esm/components/Dialog/AlertDialog.js +5 -7
- package/lib-esm/components/Dialog/AlertDialog.js.map +1 -1
- package/lib-esm/components/Dialog/ConfirmDialog.d.ts +2 -2
- package/lib-esm/components/Dialog/ConfirmDialog.js +4 -7
- package/lib-esm/components/Dialog/ConfirmDialog.js.map +1 -1
- package/lib-esm/components/Dialog/Dialog.d.ts +8 -11
- package/lib-esm/components/Dialog/Dialog.js +3 -2
- package/lib-esm/components/Dialog/Dialog.js.map +1 -1
- package/lib-esm/components/Dialog/PromptDialog.d.ts +2 -2
- package/lib-esm/components/Dialog/PromptDialog.js +4 -11
- package/lib-esm/components/Dialog/PromptDialog.js.map +1 -1
- package/lib-esm/components/DragAndDrop/DragAndDrop.d.ts +18 -0
- package/lib-esm/components/DragAndDrop/DragAndDrop.js +25 -0
- package/lib-esm/components/DragAndDrop/DragAndDrop.js.map +1 -0
- package/lib-esm/components/DragAndDrop/DragItem.d.ts +9 -0
- package/lib-esm/components/DragAndDrop/DragItem.js +49 -0
- package/lib-esm/components/DragAndDrop/DragItem.js.map +1 -0
- package/lib-esm/components/DragAndDrop/index.d.ts +2 -0
- package/lib-esm/components/DragAndDrop/index.js +3 -0
- package/lib-esm/components/DragAndDrop/index.js.map +1 -0
- package/lib-esm/components/DragAndDrop/types.d.ts +9 -0
- package/lib-esm/components/DragAndDrop/types.js +8 -0
- package/lib-esm/components/DragAndDrop/types.js.map +1 -0
- package/lib-esm/components/Drawer/Drawer.d.ts +3 -3
- package/lib-esm/components/Drawer/Drawer.js +5 -3
- package/lib-esm/components/Drawer/Drawer.js.map +1 -1
- package/lib-esm/components/Groups/Group.d.ts +1 -1
- package/lib-esm/components/Groups/Group.js +15 -7
- package/lib-esm/components/Groups/Group.js.map +1 -1
- package/lib-esm/components/Groups/GroupLabel.d.ts +4 -2
- package/lib-esm/components/Input/Checkbox.d.ts +2 -2
- package/lib-esm/components/Input/Checkbox.js +4 -4
- package/lib-esm/components/Input/Checkbox.js.map +1 -1
- package/lib-esm/components/Input/Dropdown.d.ts +17 -19
- package/lib-esm/components/Input/Dropdown.js +37 -23
- package/lib-esm/components/Input/Dropdown.js.map +1 -1
- package/lib-esm/components/Input/Input.d.ts +5 -2
- package/lib-esm/components/Input/Input.js +2 -4
- package/lib-esm/components/Input/Input.js.map +1 -1
- package/lib-esm/components/Input/Radio.d.ts +2 -1
- package/lib-esm/components/Input/Radio.js +2 -4
- package/lib-esm/components/Input/Radio.js.map +1 -1
- package/lib-esm/components/Input/RadioButton.d.ts +5 -2
- package/lib-esm/components/Input/RadioButton.js +2 -4
- package/lib-esm/components/Input/RadioButton.js.map +1 -1
- package/lib-esm/components/Input/Select.d.ts +1 -1
- package/lib-esm/components/Input/Select.js +4 -9
- package/lib-esm/components/Input/Select.js.map +1 -1
- package/lib-esm/components/Input/TextArea.d.ts +1 -1
- package/lib-esm/components/Input/TextArea.js +3 -5
- package/lib-esm/components/Input/TextArea.js.map +1 -1
- package/lib-esm/components/Input/Toggle.d.ts +3 -2
- package/lib-esm/components/Input/Toggle.js +2 -5
- package/lib-esm/components/Input/Toggle.js.map +1 -1
- package/lib-esm/components/Menu/Menu.d.ts +4 -9
- package/lib-esm/components/Menu/Menu.js +6 -5
- package/lib-esm/components/Menu/Menu.js.map +1 -1
- package/lib-esm/components/Menu/MenuContext.d.ts +0 -1
- package/lib-esm/components/Menu/MenuItem.d.ts +3 -3
- package/lib-esm/components/Menu/MenuItem.js +4 -5
- package/lib-esm/components/Menu/MenuItem.js.map +1 -1
- package/lib-esm/components/Modal/Modal.d.ts +3 -3
- package/lib-esm/components/Modal/Modal.js +5 -3
- package/lib-esm/components/Modal/Modal.js.map +1 -1
- package/lib-esm/components/Notification/Notification.d.ts +4 -36
- package/lib-esm/components/Notification/Notification.js +4 -19
- package/lib-esm/components/Notification/Notification.js.map +1 -1
- package/lib-esm/components/Notification/NotificationManager.d.ts +2 -2
- package/lib-esm/components/Notification/NotificationManager.js +7 -18
- package/lib-esm/components/Notification/NotificationManager.js.map +1 -1
- package/lib-esm/components/Notification/index.d.ts +2 -1
- package/lib-esm/components/Notification/index.js +2 -1
- package/lib-esm/components/Notification/index.js.map +1 -1
- package/lib-esm/components/Notification/style.d.ts +38 -17
- package/lib-esm/components/Notification/style.js +1 -1
- package/lib-esm/components/Notification/style.js.map +1 -1
- package/lib-esm/components/Notification/types.d.ts +34 -0
- package/lib-esm/components/Notification/types.js +18 -0
- package/lib-esm/components/Notification/types.js.map +1 -0
- package/lib-esm/components/Popover/Popover.d.ts +1 -1
- package/lib-esm/components/Popover/Popover.js +15 -7
- package/lib-esm/components/Popover/Popover.js.map +1 -1
- package/lib-esm/components/Spinner/Spinner.d.ts +2 -2
- package/lib-esm/components/Spinner/Spinner.js +2 -2
- package/lib-esm/components/Spinner/Spinner.js.map +1 -1
- package/lib-esm/components/Stepper/Step.d.ts +17 -0
- package/lib-esm/components/Stepper/Step.js +27 -0
- package/lib-esm/components/Stepper/Step.js.map +1 -0
- package/lib-esm/components/Stepper/Stepper.d.ts +19 -0
- package/lib-esm/components/Stepper/Stepper.js +112 -0
- package/lib-esm/components/Stepper/Stepper.js.map +1 -0
- package/lib-esm/components/Stepper/index.d.ts +3 -0
- package/lib-esm/components/Stepper/index.js +4 -0
- package/lib-esm/components/Stepper/index.js.map +1 -0
- package/lib-esm/components/Tabs/Tab.d.ts +1 -1
- package/lib-esm/components/Tabs/Tab.js +2 -2
- package/lib-esm/components/Tabs/Tab.js.map +1 -1
- package/lib-esm/components/Tabs/Tabs.d.ts +1 -1
- package/lib-esm/components/Tabs/Tabs.js +3 -4
- package/lib-esm/components/Tabs/Tabs.js.map +1 -1
- package/lib-esm/components/Toast/Toast.js +3 -5
- package/lib-esm/components/Toast/Toast.js.map +1 -1
- package/lib-esm/components/Toast/ToastStory.d.ts +3 -1
- package/lib-esm/components/Toast/ToastStory.js +2 -1
- package/lib-esm/components/Toast/ToastStory.js.map +1 -1
- package/lib-esm/components/Tooltip/Tooltip.d.ts +3 -3
- package/lib-esm/components/Tooltip/Tooltip.js +3 -5
- package/lib-esm/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-esm/components/index.d.ts +4 -1
- package/lib-esm/components/index.js +4 -1
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/icons/CheckCircle.d.ts +1 -1
- package/lib-esm/icons/CheckCircle.js +2 -4
- package/lib-esm/icons/CheckCircle.js.map +1 -1
- package/lib-esm/icons/Close.d.ts +1 -1
- package/lib-esm/icons/Close.js +2 -4
- package/lib-esm/icons/Close.js.map +1 -1
- package/lib-esm/icons/DragIndicator.d.ts +1 -0
- package/lib-esm/icons/DragIndicator.js +5 -0
- package/lib-esm/icons/DragIndicator.js.map +1 -0
- package/lib-esm/icons/ErrorOutline.d.ts +1 -1
- package/lib-esm/icons/ErrorOutline.js +2 -3
- package/lib-esm/icons/ErrorOutline.js.map +1 -1
- package/lib-esm/icons/ExpandMore.d.ts +1 -1
- package/lib-esm/icons/ExpandMore.js +2 -4
- package/lib-esm/icons/ExpandMore.js.map +1 -1
- package/lib-esm/icons/FiberManualRecord.d.ts +1 -1
- package/lib-esm/icons/FiberManualRecord.js +2 -4
- package/lib-esm/icons/FiberManualRecord.js.map +1 -1
- package/lib-esm/icons/Info.d.ts +1 -1
- package/lib-esm/icons/Info.js +2 -4
- package/lib-esm/icons/Info.js.map +1 -1
- package/lib-esm/icons/ReportProblem.d.ts +1 -1
- package/lib-esm/icons/ReportProblem.js +2 -4
- package/lib-esm/icons/ReportProblem.js.map +1 -1
- package/lib-esm/icons/index.d.ts +1 -0
- package/lib-esm/icons/index.js +1 -0
- package/lib-esm/icons/index.js.map +1 -1
- package/lib-esm/shared/LayerManager.js +3 -2
- package/lib-esm/shared/LayerManager.js.map +1 -1
- package/lib-esm/shared/styles.d.ts +16 -5
- package/package.json +24 -22
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
export declare const DialogContainer: import("@emotion/styled
|
|
4
|
-
theme?:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}>, "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "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" | "css" | "elevated" | "theme"> & {
|
|
10
|
-
ref?: ((instance: HTMLDivElement) => void) | React.RefObject<HTMLDivElement>;
|
|
11
|
-
}, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "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" | "css" | "elevated" | "theme">, object>;
|
|
3
|
+
export declare const DialogContainer: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
} & import("../Card/Card").CardExtraProps & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
}, {}, {}>;
|
|
12
9
|
export { Header as DialogHeader, Body as DialogBody, Footer as DialogFooter, } from '../../shared/styles';
|
|
13
|
-
|
|
10
|
+
type DialogOptions = PropTypes.InferProps<typeof Dialog.propTypes>;
|
|
14
11
|
interface DialogState {
|
|
15
12
|
show: boolean;
|
|
16
13
|
}
|
|
@@ -34,6 +31,6 @@ declare class Dialog extends React.Component<React.PropsWithChildren<DialogOptio
|
|
|
34
31
|
open: (closeCallback?: (resp: any) => void) => void;
|
|
35
32
|
close: (resp?: any) => void;
|
|
36
33
|
private closeCallback;
|
|
37
|
-
render(): JSX.Element;
|
|
34
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
38
35
|
}
|
|
39
36
|
export default Dialog;
|
|
@@ -9,6 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
12
13
|
import React from 'react';
|
|
13
14
|
import PropTypes from 'prop-types';
|
|
14
15
|
import styled from '@emotion/styled';
|
|
@@ -67,10 +68,10 @@ class Dialog extends React.Component {
|
|
|
67
68
|
closeCallback: this.closeCallback,
|
|
68
69
|
closeOnOverlayClick,
|
|
69
70
|
position: LAYER_POSITION.DIALOG,
|
|
70
|
-
component: (
|
|
71
|
+
component: (_jsx(DialogContainer, Object.assign({}, rest, { onClick: e => e.stopPropagation(), elevated: true, children: children })))
|
|
71
72
|
});
|
|
72
73
|
this.closeDialog = closeFn;
|
|
73
|
-
return
|
|
74
|
+
return _jsx(Component, {});
|
|
74
75
|
}
|
|
75
76
|
else {
|
|
76
77
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,YAAY,EAAE,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;A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AAW,CAAC;gBACnD,SAAS,EAAE,GAAG;gBACd,OAAO,EAAE,IAAI;gBACb,UAAU;gBACV,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,mBAAmB;gBACnB,QAAQ,EAAE,cAAc,CAAC,MAAM;gBAC/B,SAAS,EAAE,CACP,KAAC,eAAe,oBAAK,IAAI,IAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,QAAQ,kBACjE,QAAQ,IACK,CACrB;aACJ,CAAC,CAAC;YACH,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;YAC3B,OAAO,KAAC,SAAS,KAAG,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;;AA/DM,gBAAS,GAAG;IACf,kEAAkE;IAClE,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,6DAA6D;IAC7D,mBAAmB,EAAE,SAAS,CAAC,IAAI;CACtC,AALe,CAKf;AAEM,mBAAY,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;CAC5B,AAHkB,CAGlB;AAwDL,eAAe,MAAM,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
type PromptOption = PropTypes.InferProps<typeof PromptDialog.propTypes>;
|
|
4
4
|
export default class PromptDialog extends React.Component<PromptOption, {
|
|
5
5
|
value: string;
|
|
6
6
|
}> {
|
|
@@ -31,6 +31,6 @@ export default class PromptDialog extends React.Component<PromptOption, {
|
|
|
31
31
|
private cancel;
|
|
32
32
|
private submit;
|
|
33
33
|
show: () => Promise<unknown>;
|
|
34
|
-
render(): JSX.Element;
|
|
34
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import React, { createRef } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import styled from '@emotion/styled';
|
|
@@ -7,7 +8,7 @@ import { Input } from '../Input';
|
|
|
7
8
|
const BodyText = styled.p `
|
|
8
9
|
margin-top: 0;
|
|
9
10
|
`;
|
|
10
|
-
|
|
11
|
+
class PromptDialog extends React.Component {
|
|
11
12
|
constructor(props) {
|
|
12
13
|
super(props);
|
|
13
14
|
this.dialog = createRef();
|
|
@@ -43,16 +44,7 @@ export default class PromptDialog extends React.Component {
|
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
46
|
const { header, body, inputProps, submitText, cancelText, dialogProps } = this.props;
|
|
46
|
-
return (
|
|
47
|
-
React.createElement("form", { onSubmit: this.submit },
|
|
48
|
-
header && React.createElement(DialogHeader, null, header),
|
|
49
|
-
React.createElement(DialogBody, null,
|
|
50
|
-
React.createElement(BodyText, null, body),
|
|
51
|
-
React.createElement("div", { style: { display: 'flex' } },
|
|
52
|
-
React.createElement(Input, Object.assign({ style: { width: 'auto', flex: '1' }, value: this.state.value, onChange: this.valueChange, autoFocus: true }, inputProps)))),
|
|
53
|
-
React.createElement(DialogFooter, null,
|
|
54
|
-
React.createElement(Button, { type: 'button', onClick: this.cancel }, cancelText),
|
|
55
|
-
React.createElement(ActionButton, null, submitText)))));
|
|
47
|
+
return (_jsx(Dialog, Object.assign({}, dialogProps, { ref: this.dialog, closeOnEsc: false, closeOnOverlayClick: false, children: _jsxs("form", { onSubmit: this.submit, children: [header && _jsx(DialogHeader, { children: header }), _jsxs(DialogBody, { children: [_jsx(BodyText, { children: body }), _jsx("div", { style: { display: 'flex' }, children: _jsx(Input, Object.assign({ style: { width: 'auto', flex: '1' }, value: this.state.value, onChange: this.valueChange, autoFocus: true }, inputProps)) })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: 'button', onClick: this.cancel, children: cancelText }), _jsx(ActionButton, { children: submitText })] })] }) })));
|
|
56
48
|
}
|
|
57
49
|
}
|
|
58
50
|
PromptDialog.propTypes = {
|
|
@@ -76,4 +68,5 @@ PromptDialog.defaultProps = {
|
|
|
76
68
|
submitText: 'Submit',
|
|
77
69
|
defaultValue: '',
|
|
78
70
|
};
|
|
71
|
+
export default PromptDialog;
|
|
79
72
|
//# sourceMappingURL=PromptDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/PromptDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;;CAExB,CAAA;AAED,
|
|
1
|
+
{"version":3,"file":"PromptDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/PromptDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC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fe,CAef;AAEM,yBAAY,GAAG;IAClB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE,EAAE;CACnB,AAJkB,CAIlB;eAtBgB,YAAY"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ORIENTATION } from './types';
|
|
3
|
+
type DragAndDropProps = {
|
|
4
|
+
/** Orientation of the list layout */
|
|
5
|
+
orientation: ORIENTATION;
|
|
6
|
+
/** Drop event handler */
|
|
7
|
+
onDrop: (start: number, end: number) => void;
|
|
8
|
+
/** Shows drag indicator against each list item */
|
|
9
|
+
showIndicator: boolean;
|
|
10
|
+
} & PropsWithChildren<{}>;
|
|
11
|
+
declare function DragAndDrop(props: DragAndDropProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace DragAndDrop {
|
|
13
|
+
var defaultProps: {
|
|
14
|
+
orientation: ORIENTATION;
|
|
15
|
+
showIndicator: boolean;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export default DragAndDrop;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import DragItem from './DragItem';
|
|
5
|
+
import { ORIENTATION, DragContext } from './types';
|
|
6
|
+
const Container = styled.div `
|
|
7
|
+
flex: 1;
|
|
8
|
+
display: flex;
|
|
9
|
+
position: relative;
|
|
10
|
+
flex-direction: ${props => props.orientation === ORIENTATION.HORIZONTAL ? 'row' : 'column'};
|
|
11
|
+
`;
|
|
12
|
+
export default function DragAndDrop(props) {
|
|
13
|
+
const { orientation, children, onDrop, showIndicator } = props;
|
|
14
|
+
const [startIndex, setStartIndex] = useState(null);
|
|
15
|
+
const drop = (index) => {
|
|
16
|
+
startIndex !== null && (onDrop === null || onDrop === void 0 ? void 0 : onDrop(startIndex, index));
|
|
17
|
+
setStartIndex(null);
|
|
18
|
+
};
|
|
19
|
+
return (_jsx(DragContext.Provider, { value: { startIndex, setStartIndex, drop }, children: _jsx(Container, { orientation: orientation, children: React.Children.map(children, (child, index) => (_jsx(DragItem, { index: index, orientation: orientation, showIndicator: showIndicator, children: child }))) }) }));
|
|
20
|
+
}
|
|
21
|
+
DragAndDrop.defaultProps = {
|
|
22
|
+
orientation: ORIENTATION.VERTICAL,
|
|
23
|
+
showIndicator: false,
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=DragAndDrop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragAndDrop.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/DragAndDrop.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAWnD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAA4B;;;;sBAIlC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;CAC7F,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACvD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAS,IAAI,CAAC,CAAC;IAE3D,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE;QAC3B,UAAU,KAAK,IAAI,KAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,UAAU,EAAE,KAAK,CAAC,CAAA,CAAC;QACnD,aAAa,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAA;IAED,OAAO,CAAC,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,YACpE,KAAC,SAAS,IAAC,WAAW,EAAE,WAAW,YAC9B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,YACzE,KAAK,GACC,CACd,CAAC,GACM,GACO,CAAC,CAAC;AAC7B,CAAC;AAED,WAAW,CAAC,YAAY,GAAG;IACvB,WAAW,EAAE,WAAW,CAAC,QAAQ;IACjC,aAAa,EAAE,KAAK;CACvB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ORIENTATION } from './types';
|
|
3
|
+
interface DragItemProps {
|
|
4
|
+
index: number;
|
|
5
|
+
orientation: ORIENTATION;
|
|
6
|
+
showIndicator: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function DragItem(props: PropsWithChildren<DragItemProps>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useContext, useState } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import constants from '../../shared/constants';
|
|
5
|
+
import { ORIENTATION, DragContext } from './types';
|
|
6
|
+
import { DragIndicator } from '../../icons';
|
|
7
|
+
const Item = styled.div `
|
|
8
|
+
cursor: ${props => props.showIndicator ? 'default' : 'move'};
|
|
9
|
+
display: flex;
|
|
10
|
+
border-top: 2px solid ${props => props.orientation === ORIENTATION.VERTICAL && props.active > 0
|
|
11
|
+
? constants.PRIMARY : 'transparent'};
|
|
12
|
+
border-bottom: 2px solid ${props => props.orientation === ORIENTATION.VERTICAL && props.active < 0
|
|
13
|
+
? constants.PRIMARY : 'transparent'};
|
|
14
|
+
border-left: 2px solid ${props => props.orientation === ORIENTATION.HORIZONTAL && props.active > 0
|
|
15
|
+
? constants.PRIMARY : 'transparent'};
|
|
16
|
+
border-right: 2px solid ${props => props.orientation === ORIENTATION.HORIZONTAL && props.active < 0
|
|
17
|
+
? constants.PRIMARY : 'transparent'};
|
|
18
|
+
`;
|
|
19
|
+
const DragKnob = styled.div `
|
|
20
|
+
padding-top: 8px;
|
|
21
|
+
cursor: move;
|
|
22
|
+
color: var(--disabled, ${constants.DISABLED});
|
|
23
|
+
`;
|
|
24
|
+
const Container = styled.div `
|
|
25
|
+
flex: 1;
|
|
26
|
+
`;
|
|
27
|
+
export default function DragItem(props) {
|
|
28
|
+
const { index, orientation, children, showIndicator } = props;
|
|
29
|
+
const [active, setActive] = useState(0);
|
|
30
|
+
const context = useContext(DragContext);
|
|
31
|
+
const dragStartHandler = (e) => {
|
|
32
|
+
context.setStartIndex(index);
|
|
33
|
+
};
|
|
34
|
+
const dragOverHandler = (e) => {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
setActive(context.startIndex - index);
|
|
38
|
+
};
|
|
39
|
+
const dragExitHandler = () => {
|
|
40
|
+
setActive(0);
|
|
41
|
+
};
|
|
42
|
+
const dropHandler = (e) => {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
setActive(0);
|
|
45
|
+
context.drop(index);
|
|
46
|
+
};
|
|
47
|
+
return _jsxs(Item, { draggable: !showIndicator, showIndicator: showIndicator, active: active, orientation: orientation, onDragStart: !showIndicator && dragStartHandler, onDragOver: dragOverHandler, onDragLeave: dragExitHandler, onDrop: dropHandler, children: [showIndicator && _jsx(DragKnob, { draggable: true, onDragStart: dragStartHandler, children: _jsx(DragIndicator, {}) }), _jsx(Container, { children: children })] });
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=DragItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragItem.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/DragItem.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAuC,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQ5C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAoE;cAC7E,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;;4BAEnC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;IAC3F,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;+BACZ,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;IAC9F,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;6BACd,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,UAAU,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;IAC9F,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;8BACb,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,CAAC,UAAU,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;IAC/F,CA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C,aAAa,IAAI,gBAAgB,EAC/C,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,WAAW,aAElB,aAAa,IAAI,KAAC,QAAQ,IACvB,SAAS,QACT,WAAW,EAAE,gBAAgB,YAChC,KAAC,aAAa,KAAG,GAAW,EAC7B,KAAC,SAAS,cAAE,QAAQ,GAAa,IAC9B,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
export var ORIENTATION;
|
|
3
|
+
(function (ORIENTATION) {
|
|
4
|
+
ORIENTATION["HORIZONTAL"] = "horizontal";
|
|
5
|
+
ORIENTATION["VERTICAL"] = "vertical";
|
|
6
|
+
})(ORIENTATION || (ORIENTATION = {}));
|
|
7
|
+
export const DragContext = createContext(null);
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAIrC,IAAI,CAAC,CAAC"}
|
|
@@ -6,11 +6,11 @@ export declare enum DRAWER_POSITION {
|
|
|
6
6
|
RIGHT = "RIGHT",
|
|
7
7
|
BOTTOM = "BOTTOM"
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type DrawerProps = PropTypes.InferProps<typeof Drawer.propTypes>;
|
|
10
10
|
interface DrawerState {
|
|
11
11
|
open: boolean;
|
|
12
12
|
}
|
|
13
|
-
export default class Drawer extends React.Component<DrawerProps
|
|
13
|
+
export default class Drawer extends React.Component<React.PropsWithChildren<DrawerProps>, DrawerState> {
|
|
14
14
|
state: {
|
|
15
15
|
open: boolean;
|
|
16
16
|
};
|
|
@@ -43,5 +43,5 @@ export default class Drawer extends React.Component<DrawerProps, DrawerState> {
|
|
|
43
43
|
private closeCallback;
|
|
44
44
|
private onClose;
|
|
45
45
|
getSnapshotBeforeUpdate(prevProps: DrawerProps): void;
|
|
46
|
-
render(): JSX.Element;
|
|
46
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
47
|
}
|
|
@@ -9,6 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
12
13
|
import React from 'react';
|
|
13
14
|
import PropTypes from 'prop-types';
|
|
14
15
|
import styled from '@emotion/styled';
|
|
@@ -60,7 +61,7 @@ const positionMap = {
|
|
|
60
61
|
[DRAWER_POSITION.RIGHT]: LAYER_POSITION.TOP_RIGHT,
|
|
61
62
|
[DRAWER_POSITION.BOTTOM]: LAYER_POSITION.BOTTOM_LEFT,
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
+
class Drawer extends React.Component {
|
|
64
65
|
constructor() {
|
|
65
66
|
super(...arguments);
|
|
66
67
|
this.state = {
|
|
@@ -96,7 +97,7 @@ export default class Drawer extends React.Component {
|
|
|
96
97
|
closeCallback: this.onClose,
|
|
97
98
|
closeOnEsc,
|
|
98
99
|
closeOnOverlayClick,
|
|
99
|
-
component: (
|
|
100
|
+
component: (_jsx(DrawerDiv, Object.assign({}, rest, { position: position, size: size, onClick: e => e.stopPropagation(), children: children })))
|
|
100
101
|
});
|
|
101
102
|
this.closeCallback = this.layer[1];
|
|
102
103
|
this.forceUpdate();
|
|
@@ -105,7 +106,7 @@ export default class Drawer extends React.Component {
|
|
|
105
106
|
render() {
|
|
106
107
|
if (this.state.open && this.layer) {
|
|
107
108
|
const [Component] = this.layer;
|
|
108
|
-
return
|
|
109
|
+
return _jsx(Component, {});
|
|
109
110
|
}
|
|
110
111
|
return null;
|
|
111
112
|
}
|
|
@@ -136,4 +137,5 @@ Drawer.defaultProps = {
|
|
|
136
137
|
closeOnEsc: true,
|
|
137
138
|
closeOnOverlayClick: true,
|
|
138
139
|
};
|
|
140
|
+
export default Drawer;
|
|
139
141
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,YAAY,EAAE,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EACH,MAAM,IAAI,YAAY,EACtB,IAAI,IAAI,UAAU,EAClB,MAAM,IAAI,YAAY,GACzB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;AACrB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC,eAAe,CAAC,IAAI,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I,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/B,OAAO,KAAC,SAAS,KAAG,CAAC;QACzB,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;;AArFM,gBAAS,GAAG;IACf,uBAAuB;IACvB,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IAC/B,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;QACtB,eAAe,CAAC,IAAI;QACpB,eAAe,CAAC,KAAK;QACrB,eAAe,CAAC,MAAM;KACzB,CAAC;IACF,yBAAyB;IACzB,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,0CAA0C;IAC1C,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,+BAA+B;IAC/B,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,yCAAyC;IACzC,mBAAmB,EAAE,SAAS,CAAC,IAAI;IACnC,wDAAwD;IACxD,OAAO,EAAE,SAAS,CAAC,IAAI;CAC1B,AAnBe,CAmBf;AAEM,mBAAY,GAAG;IAClB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,eAAe,CAAC,IAAI;IAC9B,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;CAC5B,AALkB,CAKlB;eA/BgB,MAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
declare function Group(props: React.PropsWithChildren<PropTypes.InferProps<typeof Group.propTypes>>): JSX.Element;
|
|
3
|
+
declare function Group(props: React.PropsWithChildren<PropTypes.InferProps<typeof Group.propTypes>>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace Group {
|
|
5
5
|
var propTypes: {
|
|
6
6
|
/** Error Message for the group */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import constants from '../../shared/constants';
|
|
@@ -9,7 +9,7 @@ const Container = styled.div `
|
|
|
9
9
|
margin: 5px;
|
|
10
10
|
|
|
11
11
|
/* overrides */
|
|
12
|
-
&
|
|
12
|
+
& button, & label {
|
|
13
13
|
margin: 0;
|
|
14
14
|
border: none;
|
|
15
15
|
border-radius: 0;
|
|
@@ -18,6 +18,10 @@ const Container = styled.div `
|
|
|
18
18
|
height: 32px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
& > div button {
|
|
22
|
+
border-left: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
& input, & select {
|
|
22
26
|
border: none;
|
|
23
27
|
height: 32px;
|
|
@@ -31,15 +35,21 @@ const Container = styled.div `
|
|
|
31
35
|
box-shadow: none;
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
& > div > span {
|
|
39
|
+
top: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
34
42
|
/* Handling for first and last child */
|
|
35
43
|
& > *:first-child, & > label:first-child input,
|
|
36
|
-
& > label:first-child select
|
|
44
|
+
& > label:first-child select, & > *:first-child label,
|
|
45
|
+
& > *:first-child input {
|
|
37
46
|
border-left: none;
|
|
38
47
|
border-radius: 2px 0 0 2px;
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
& > *:last-child, & > label:last-child input,
|
|
42
|
-
& > label:last-child select
|
|
51
|
+
& > label:last-child select, & > *:last-child label,
|
|
52
|
+
& > *:last-child input {
|
|
43
53
|
border-radius: 0 2px 2px 0;
|
|
44
54
|
}
|
|
45
55
|
|
|
@@ -66,9 +76,7 @@ const ErrorContainer = styled.div `
|
|
|
66
76
|
font-size: 12px;
|
|
67
77
|
`;
|
|
68
78
|
export default function Group(props) {
|
|
69
|
-
return (
|
|
70
|
-
React.createElement(Container, Object.assign({}, props), props.children),
|
|
71
|
-
props.errorText && React.createElement(ErrorContainer, null, props.errorText)));
|
|
79
|
+
return (_jsxs(_Fragment, { children: [_jsx(Container, Object.assign({}, props, { children: props.children })), props.errorText && _jsx(ErrorContainer, { children: props.errorText })] }));
|
|
72
80
|
}
|
|
73
81
|
Group.propTypes = {
|
|
74
82
|
/** Error Message for the group */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../src/components/Groups/Group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../src/components/Groups/Group.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAA8C;;4CAE9B,SAAS,CAAC,YAAY;;;;;;;;;qDASb,SAAS,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CA8CjC,SAAS,CAAC,YAAY;;;MAG1D,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;qCACI,SAAS,CAAC,KAAK;;;yCAGX,SAAS,CAAC,KAAK;;KAEnD,CAAA,CAAC,CAAC,EAAE;CACR,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;0BACP,SAAS,CAAC,KAAK;;;CAGxC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAA4E;IACtG,OAAO,CACH,8BACI,KAAC,SAAS,oBAAK,KAAK,cACf,KAAK,CAAC,QAAQ,IACP,EACV,KAAK,CAAC,SAAS,IAAI,KAAC,cAAc,cAAE,KAAK,CAAC,SAAS,GAAkB,IACxE,CACN,CAAA;AACL,CAAC;AAED,KAAK,CAAC,SAAS,GAAG;IACd,kCAAkC;IAClC,SAAS,EAAE,SAAS,CAAC,MAAM;CAC9B,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
3
|
+
type CheckboxProps = Omit<React.HTMLProps<HTMLInputElement>, 'as'> & PropTypes.InferProps<typeof Checkbox.propTypes>;
|
|
4
|
+
declare function Checkbox(props: CheckboxProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare namespace Checkbox {
|
|
6
6
|
var propTypes: {
|
|
7
7
|
/** Label for the field */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import styled from '@emotion/styled';
|
|
4
5
|
import constants from '../../shared/constants';
|
|
@@ -9,6 +10,7 @@ const Label = styled.label `
|
|
|
9
10
|
const Input = styled.input `
|
|
10
11
|
appearance: none;
|
|
11
12
|
position: relative;
|
|
13
|
+
margin: 0;
|
|
12
14
|
|
|
13
15
|
&::before {
|
|
14
16
|
content: '';
|
|
@@ -104,9 +106,7 @@ export default function Checkbox(props) {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
}, []);
|
|
107
|
-
return (
|
|
108
|
-
React.createElement(Input, Object.assign({}, props, { ref: ref, type: "checkbox" })),
|
|
109
|
-
React.createElement("span", null, props.label)));
|
|
109
|
+
return (_jsxs(Label, { children: [_jsx(Input, Object.assign({}, props, { ref: ref, type: "checkbox" })), _jsx("span", { children: props.label })] }));
|
|
110
110
|
}
|
|
111
111
|
Checkbox.propTypes = {
|
|
112
112
|
/** Label for the field */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/Input/Checkbox.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/Input/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;;;CAGzB,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;;;;;;;;;gDASsB,SAAS,CAAC,YAAY;;;;;;;8CAOxB,SAAS,CAAC,UAAU;;;;;;;;;;;;;;;;;;;2CAmBvB,SAAS,CAAC,OAAO;uCACrB,SAAS,CAAC,OAAO;;;;;;;;;;;;2CAYb,SAAS,CAAC,OAAO;uCACrB,SAAS;;;;;;;;;;;;uCAYT,SAAS,CAAC,OAAO;+CACT,SAAS,CAAC,aAAa;;;;gCAItC,SAAS,CAAC,OAAO;;;;;uCAKV,SAAS,CAAC,OAAO;;;;gCAIxB,SAAS,CAAC,OAAO;;;;;;;;;;;;;;;CAehD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACjD,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,IAAS,EAAE,EAAE;QAClC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;gBACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC9B,CAAC;QACL,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,MAAC,KAAK,eACF,KAAC,KAAK,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,IAAG,EAC9C,yBAAO,KAAK,CAAC,KAAK,GAAQ,IACtB,CACX,CAAC;AACN,CAAC;AAED,QAAQ,CAAC,SAAS,GAAG;IACjB,0BAA0B;IAC1B,KAAK,EAAE,SAAS,CAAC,MAAM;IACvB,6CAA6C;IAC7C,aAAa,EAAE,SAAS,CAAC,IAAI;CAChC,CAAA;AAED,QAAQ,CAAC,YAAY,GAAG;IACpB,aAAa,EAAE,KAAK;IACpB,KAAK,EAAE,EAAE;CACZ,CAAA"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type DropdownProps<T> = {
|
|
3
|
+
/** Value of the control */
|
|
4
|
+
value?: T | T[];
|
|
5
|
+
/** If multiple elements can be selected */
|
|
6
|
+
multiSelect: boolean;
|
|
7
|
+
/** Change handler */
|
|
8
|
+
onChange?: (v: T | T[]) => void;
|
|
9
|
+
/** Label of the control */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Error message */
|
|
12
|
+
errorText?: string;
|
|
13
|
+
/** Makes field required */
|
|
14
|
+
required?: boolean;
|
|
15
|
+
/** Disables the field */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
} & React.PropsWithChildren<{}>;
|
|
18
|
+
declare function Dropdown<T>(props: DropdownProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
19
|
declare namespace Dropdown {
|
|
6
|
-
var propTypes: {
|
|
7
|
-
/** Value of the control */
|
|
8
|
-
value: PropTypes.Requireable<any>;
|
|
9
|
-
/** If multiple elements can be selected */
|
|
10
|
-
multiSelect: PropTypes.Requireable<boolean>;
|
|
11
|
-
/** CHange handler */
|
|
12
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
-
/** Label of the control */
|
|
14
|
-
label: PropTypes.Requireable<string>;
|
|
15
|
-
/** Error message */
|
|
16
|
-
errorText: PropTypes.Requireable<string>;
|
|
17
|
-
/** Makes field required */
|
|
18
|
-
required: PropTypes.Requireable<boolean>;
|
|
19
|
-
/** Disables the field */
|
|
20
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
21
|
-
};
|
|
22
20
|
var defaultProps: {
|
|
23
21
|
multiSelect: boolean;
|
|
24
22
|
};
|