react-science 0.28.1 → 0.30.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/lib-esm/app/hooks/file-loading.d.ts +2 -1
- package/lib-esm/app/hooks/file-loading.d.ts.map +1 -1
- package/lib-esm/app/hooks/file-loading.js.map +1 -1
- package/lib-esm/app/panels/SignalProcessingPanel.d.ts.map +1 -1
- package/lib-esm/app/panels/SignalProcessingPanel.js +3 -3
- package/lib-esm/app/panels/SignalProcessingPanel.js.map +1 -1
- package/lib-esm/components/button/Button.d.ts +8 -14
- package/lib-esm/components/button/Button.d.ts.map +1 -1
- package/lib-esm/components/button/Button.js +7 -31
- package/lib-esm/components/button/Button.js.map +1 -1
- package/lib-esm/components/drop-zone/DropZone.d.ts +6 -2
- package/lib-esm/components/drop-zone/DropZone.d.ts.map +1 -1
- package/lib-esm/components/drop-zone/DropZone.js +9 -15
- package/lib-esm/components/drop-zone/DropZone.js.map +1 -1
- package/lib-esm/components/forms/index.d.ts +0 -5
- package/lib-esm/components/forms/index.d.ts.map +1 -1
- package/lib-esm/components/forms/index.js +0 -5
- package/lib-esm/components/forms/index.js.map +1 -1
- package/lib-esm/components/forms/radio-group/RadioGroup.d.ts +1 -0
- package/lib-esm/components/forms/radio-group/RadioGroup.d.ts.map +1 -1
- package/lib-esm/components/forms/radio-group/RadioGroup.js +2 -2
- package/lib-esm/components/forms/radio-group/RadioGroup.js.map +1 -1
- package/lib-esm/components/forms/styles.d.ts +0 -22
- package/lib-esm/components/forms/styles.d.ts.map +1 -1
- package/lib-esm/components/forms/styles.js +0 -72
- package/lib-esm/components/forms/styles.js.map +1 -1
- package/lib-esm/components/header/PanelHeader.d.ts.map +1 -1
- package/lib-esm/components/header/PanelHeader.js +1 -2
- package/lib-esm/components/header/PanelHeader.js.map +1 -1
- package/lib-esm/components/index.d.ts +0 -2
- package/lib-esm/components/index.d.ts.map +1 -1
- package/lib-esm/components/index.js +0 -2
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/info-panel/InfoPanel.d.ts.map +1 -1
- package/lib-esm/components/info-panel/InfoPanel.js +5 -4
- package/lib-esm/components/info-panel/InfoPanel.js.map +1 -1
- package/lib-esm/components/modal/ConfirmModal.d.ts.map +1 -1
- package/lib-esm/components/modal/ConfirmModal.js +1 -7
- package/lib-esm/components/modal/ConfirmModal.js.map +1 -1
- package/lib-esm/components/modal/Modal.d.ts.map +1 -1
- package/lib-esm/components/modal/Modal.js +2 -2
- package/lib-esm/components/modal/Modal.js.map +1 -1
- package/lib-esm/components/toolbar/PanelPreferencesToolbar.d.ts.map +1 -1
- package/lib-esm/components/toolbar/PanelPreferencesToolbar.js +1 -2
- package/lib-esm/components/toolbar/PanelPreferencesToolbar.js.map +1 -1
- package/lib-esm/components/toolbar/Toolbar.d.ts.map +1 -1
- package/lib-esm/components/toolbar/Toolbar.js +16 -12
- package/lib-esm/components/toolbar/Toolbar.js.map +1 -1
- package/package.json +25 -23
- package/src/app/hooks/file-loading.ts +4 -2
- package/src/app/panels/SignalProcessingPanel.tsx +3 -6
- package/src/components/button/Button.tsx +29 -59
- package/src/components/drop-zone/DropZone.tsx +42 -25
- package/src/components/forms/index.ts +0 -5
- package/src/components/forms/radio-group/RadioGroup.tsx +3 -0
- package/src/components/forms/styles.ts +0 -92
- package/src/components/header/PanelHeader.tsx +1 -8
- package/src/components/index.ts +0 -2
- package/src/components/info-panel/InfoPanel.tsx +6 -3
- package/src/components/modal/ConfirmModal.tsx +2 -16
- package/src/components/modal/Modal.tsx +10 -2
- package/src/components/toolbar/PanelPreferencesToolbar.tsx +2 -15
- package/src/components/toolbar/Toolbar.tsx +25 -29
- package/lib-esm/components/dropdown-menu/DropdownMenu.d.ts +0 -28
- package/lib-esm/components/dropdown-menu/DropdownMenu.d.ts.map +0 -1
- package/lib-esm/components/dropdown-menu/DropdownMenu.js +0 -41
- package/lib-esm/components/dropdown-menu/DropdownMenu.js.map +0 -1
- package/lib-esm/components/dropdown-menu/MenuItems.d.ts +0 -19
- package/lib-esm/components/dropdown-menu/MenuItems.d.ts.map +0 -1
- package/lib-esm/components/dropdown-menu/MenuItems.js +0 -77
- package/lib-esm/components/dropdown-menu/MenuItems.js.map +0 -1
- package/lib-esm/components/dropdown-menu/index.d.ts +0 -3
- package/lib-esm/components/dropdown-menu/index.d.ts.map +0 -1
- package/lib-esm/components/dropdown-menu/index.js +0 -2
- package/lib-esm/components/dropdown-menu/index.js.map +0 -1
- package/lib-esm/components/dropdown-menu/useContextMenuPlacement.d.ts +0 -18
- package/lib-esm/components/dropdown-menu/useContextMenuPlacement.d.ts.map +0 -1
- package/lib-esm/components/dropdown-menu/useContextMenuPlacement.js +0 -49
- package/lib-esm/components/dropdown-menu/useContextMenuPlacement.js.map +0 -1
- package/lib-esm/components/forms/Checkbox.d.ts +0 -11
- package/lib-esm/components/forms/Checkbox.d.ts.map +0 -1
- package/lib-esm/components/forms/Checkbox.js +0 -35
- package/lib-esm/components/forms/Checkbox.js.map +0 -1
- package/lib-esm/components/forms/Input.d.ts +0 -19
- package/lib-esm/components/forms/Input.d.ts.map +0 -1
- package/lib-esm/components/forms/Input.js +0 -60
- package/lib-esm/components/forms/Input.js.map +0 -1
- package/lib-esm/components/forms/Select.d.ts +0 -21
- package/lib-esm/components/forms/Select.d.ts.map +0 -1
- package/lib-esm/components/forms/Select.js +0 -90
- package/lib-esm/components/forms/Select.js.map +0 -1
- package/lib-esm/components/forms/TextArea.d.ts +0 -8
- package/lib-esm/components/forms/TextArea.d.ts.map +0 -1
- package/lib-esm/components/forms/TextArea.js +0 -19
- package/lib-esm/components/forms/TextArea.js.map +0 -1
- package/lib-esm/components/forms/context/FieldsContext.d.ts +0 -16
- package/lib-esm/components/forms/context/FieldsContext.d.ts.map +0 -1
- package/lib-esm/components/forms/context/FieldsContext.js +0 -47
- package/lib-esm/components/forms/context/FieldsContext.js.map +0 -1
- package/lib-esm/components/forms/context/index.d.ts +0 -2
- package/lib-esm/components/forms/context/index.d.ts.map +0 -1
- package/lib-esm/components/forms/context/index.js +0 -2
- package/lib-esm/components/forms/context/index.js.map +0 -1
- package/lib-esm/components/modal/ModalCloseButton.d.ts +0 -4
- package/lib-esm/components/modal/ModalCloseButton.d.ts.map +0 -1
- package/lib-esm/components/modal/ModalCloseButton.js +0 -11
- package/lib-esm/components/modal/ModalCloseButton.js.map +0 -1
- package/lib-esm/components/spinner/FullSpinner.d.ts +0 -7
- package/lib-esm/components/spinner/FullSpinner.d.ts.map +0 -1
- package/lib-esm/components/spinner/FullSpinner.js +0 -24
- package/lib-esm/components/spinner/FullSpinner.js.map +0 -1
- package/lib-esm/components/spinner/index.d.ts +0 -2
- package/lib-esm/components/spinner/index.d.ts.map +0 -1
- package/lib-esm/components/spinner/index.js +0 -2
- package/lib-esm/components/spinner/index.js.map +0 -1
- package/src/components/dropdown-menu/DropdownMenu.tsx +0 -160
- package/src/components/dropdown-menu/MenuItems.tsx +0 -146
- package/src/components/dropdown-menu/index.ts +0 -2
- package/src/components/dropdown-menu/useContextMenuPlacement.ts +0 -76
- package/src/components/forms/Checkbox.tsx +0 -77
- package/src/components/forms/Input.tsx +0 -144
- package/src/components/forms/Select.tsx +0 -197
- package/src/components/forms/TextArea.tsx +0 -45
- package/src/components/forms/context/FieldsContext.tsx +0 -82
- package/src/components/forms/context/index.ts +0 -1
- package/src/components/modal/ModalCloseButton.tsx +0 -21
- package/src/components/spinner/FullSpinner.tsx +0 -57
- package/src/components/spinner/index.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoPanel.js","sourceRoot":"","sources":["../../../src/components/info-panel/InfoPanel.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,wGAAwG;AACxG,aAAa;AACb,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OA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IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA8CD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/ConfirmModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA8CD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,kDAiEpD"}
|
|
@@ -59,12 +59,6 @@ export function ConfirmModal(props) {
|
|
|
59
59
|
if (!isOpen) {
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
return (_jsx(Portal, { children: _jsx(ConfirmModalDialog, { ...dialogProps, ref: dialogRef, children: isModalShown && (_jsx(RootLayoutProvider, { innerRef: portalDomNode, children: _jsxs(ConfirmModalContents, { headerColor: headerColor, style: { maxWidth }, children: [_jsx(ConfirmModalChildrenRoot, { headerColor: headerColor, children: children }), _jsxs(ConfirmModalFooter, { children: [_jsx(Button, { onClick: onConfirm,
|
|
63
|
-
basic: 'hsla(243deg, 75%, 58%, 1)',
|
|
64
|
-
hover: 'hsla(245deg, 58%, 50%, 1)',
|
|
65
|
-
}, color: { basic: 'white' }, children: saveText }), _jsx(Button, { onClick: onCancel, backgroundColor: {
|
|
66
|
-
basic: 'hsla(0deg, 72%, 50%, 1)',
|
|
67
|
-
hover: 'hsla(0deg, 73%, 42%, 1)',
|
|
68
|
-
}, color: { basic: 'white' }, children: cancelText })] })] }) })) }) }));
|
|
62
|
+
return (_jsx(Portal, { children: _jsx(ConfirmModalDialog, { ...dialogProps, ref: dialogRef, children: isModalShown && (_jsx(RootLayoutProvider, { innerRef: portalDomNode, children: _jsxs(ConfirmModalContents, { headerColor: headerColor, style: { maxWidth }, children: [_jsx(ConfirmModalChildrenRoot, { headerColor: headerColor, children: children }), _jsxs(ConfirmModalFooter, { children: [_jsx(Button, { intent: "primary", onClick: onConfirm, children: saveText }), _jsx(Button, { intent: "danger", onClick: onCancel, children: cancelText })] })] }) })) }) }));
|
|
69
63
|
}
|
|
70
64
|
//# sourceMappingURL=ConfirmModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmModal.js","sourceRoot":"","sources":["../../../src/components/modal/ConfirmModal.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,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AE,SAAS,YACxC,QAAQ,GACF,EACT,KAAC,MAAM,IAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,YACtC,UAAU,GACJ,IACU,IACA,GACJ,CACtB,GACkB,GACd,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASrD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8CD,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASrD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8CD,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,kDAgEtC;yBAhEe,KAAK"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
4
|
+
import { Button } from '../index';
|
|
4
5
|
import { Portal } from '../root-layout/Portal';
|
|
5
6
|
import { RootLayoutProvider } from '../root-layout/RootLayoutContext';
|
|
6
|
-
import ModalCloseButton from './ModalCloseButton';
|
|
7
7
|
import { useDialog } from './useDialog';
|
|
8
8
|
const DialogRoot = styled.dialog `
|
|
9
9
|
background-color: transparent;
|
|
@@ -64,7 +64,7 @@ export function Modal(props) {
|
|
|
64
64
|
maxWidth,
|
|
65
65
|
height: height || 'max-content',
|
|
66
66
|
width: width || '100%',
|
|
67
|
-
}, children: [children, hasCloseButton && _jsx(
|
|
67
|
+
}, children: [children, hasCloseButton && (_jsx(Button, { style: { position: 'absolute', top: 4, right: 4 }, onClick: onRequestClose, intent: "danger", minimal: true, icon: "cross" }))] }) })) }) }));
|
|
68
68
|
}
|
|
69
69
|
Modal.Header = function ModalHeader(props) {
|
|
70
70
|
return _jsx(ModalHeaderStyled, { children: props.children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":";AA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3,"file":"PanelPreferencesToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/PanelPreferencesToolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelPreferencesToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/PanelPreferencesToolbar.tsx"],"names":[],"mappings":"AAKA,UAAU,4BAA4B;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAgBD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,oDAQ1E"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { FaCheck, FaTimes } from 'react-icons/fa';
|
|
5
4
|
import { Button } from '../button/Button';
|
|
6
5
|
const styles = {
|
|
7
6
|
toolbar: css({
|
|
@@ -18,6 +17,6 @@ const styles = {
|
|
|
18
17
|
};
|
|
19
18
|
export function PanelPreferencesToolbar(props) {
|
|
20
19
|
const { onClose, onSave } = props;
|
|
21
|
-
return (_jsxs("div", { css: styles.toolbar, children: [_jsx(Button, {
|
|
20
|
+
return (_jsxs("div", { css: styles.toolbar, children: [_jsx(Button, { minimal: true, onClick: onClose, intent: "danger", icon: "cross" }), _jsx(Button, { minimal: true, onClick: onSave, intent: "success", icon: "tick" })] }));
|
|
22
21
|
}
|
|
23
22
|
//# sourceMappingURL=PanelPreferencesToolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelPreferencesToolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/PanelPreferencesToolbar.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelPreferencesToolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/PanelPreferencesToolbar.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,GAAG,CAAC;QACX,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,aAAa;QAC5B,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,CAAC;QACV,YAAY,EAAE;YACZ,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,CAAC;YACd,QAAQ,EAAE,MAAM;SACjB;KACF,CAAC;CACH,CAAC;AAEF,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACzE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAClC,OAAO,CACL,eAAK,GAAG,EAAE,MAAM,CAAC,OAAO,aACtB,KAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAG,EACjE,KAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,MAAM,GAAG,IAC5D,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAEL,WAAW,EAGX,MAAM,EACP,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,YAAY,EACZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAUf,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EACL,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,GACrC,YAAY,CAAC,gBAAgB,CAAC,GAC9B,QAAQ,CAAC,SAAS,CAAC,GACnB,OAAO,GACP,IAAI,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,oDAoD1C;yBApDe,OAAO"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonGroup, Classes, Colors, } from '@blueprintjs/core';
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { useLayoutEffect, useMemo, useRef, } from 'react';
|
|
6
|
+
import { Button } from '../index';
|
|
6
7
|
import { toolbarContext, useToolbarContext, } from './toolbarContext';
|
|
7
8
|
const border = '1px solid rgb(247, 247, 247)';
|
|
8
9
|
export function Toolbar(props) {
|
|
@@ -42,17 +43,20 @@ export function Toolbar(props) {
|
|
|
42
43
|
Toolbar.Item = function ToolbarItem(props) {
|
|
43
44
|
const { active = false, icon, onClick, title, id, ...other } = props;
|
|
44
45
|
const { intent, large, vertical, disabled } = useToolbarContext();
|
|
45
|
-
return (_jsx(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
return (_jsx(Button, { minimal: true, disabled: disabled, css: css `
|
|
47
|
+
.${Classes.ICON} {
|
|
48
|
+
color: ${Colors.DARK_GRAY3};
|
|
49
|
+
}
|
|
50
|
+
`, intent: intent, style: { position: 'relative', fontSize: '1.25em', width: 'auto' }, type: "button", active: active, icon: icon, onClick: () => {
|
|
51
|
+
if (onClick) {
|
|
52
|
+
onClick(props);
|
|
53
|
+
}
|
|
54
|
+
}, tooltipProps: {
|
|
55
|
+
content: title,
|
|
56
|
+
placement: vertical ? 'right' : 'bottom',
|
|
57
|
+
intent,
|
|
58
|
+
compact: !large,
|
|
59
|
+
}, ...other }));
|
|
56
60
|
};
|
|
57
61
|
function ToolbarProvider(props) {
|
|
58
62
|
return (_jsx(toolbarContext.Provider, { value: props.value, children: props.children }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EACL,WAAW,EAEX,OAAO,EACP,MAAM,GAEP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAGL,eAAe,EACf,OAAO,EACP,MAAM,GACP,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAEL,cAAc,EACd,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAwB1B,MAAM,MAAM,GAAG,8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EAAE;YACZ,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;YACxC,MAAM;YACN,OAAO,EAAE,CAAC,KAAK;SAChB,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,eAAe,CAAC,KAGxB;IACC,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,YACxC,KAAK,CAAC,QAAQ,GACS,CAC3B,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-science",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "React components to build scientific applications UI",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./app": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"test-only": "vitest run --coverage "
|
|
48
48
|
},
|
|
49
49
|
"volta": {
|
|
50
|
-
"node": "20.
|
|
50
|
+
"node": "20.9.0"
|
|
51
51
|
},
|
|
52
52
|
"overrides": {
|
|
53
53
|
"react": "^18.2.0",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"react-dom": ">=18.0.0"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
+
"@blueprintjs/select": "^5.0.19",
|
|
63
64
|
"@emotion/react": "^11.11.1",
|
|
64
65
|
"@emotion/styled": "^11.11.0",
|
|
65
66
|
"@headlessui/react": "^1.7.17",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
69
70
|
"@radix-ui/react-radio-group": "^1.1.3",
|
|
70
71
|
"@radix-ui/react-select": "^2.0.0",
|
|
71
|
-
"@tanstack/react-query": "^
|
|
72
|
+
"@tanstack/react-query": "^5.8.2",
|
|
72
73
|
"@tanstack/react-table": "^8.10.7",
|
|
73
74
|
"biologic-converter": "^0.6.0",
|
|
74
75
|
"cheminfo-types": "^1.7.2",
|
|
@@ -97,38 +98,39 @@
|
|
|
97
98
|
"wdf-parser": "^0.3.0"
|
|
98
99
|
},
|
|
99
100
|
"devDependencies": {
|
|
100
|
-
"@babel/core": "^7.23.
|
|
101
|
-
"@babel/eslint-parser": "^7.
|
|
102
|
-
"@
|
|
103
|
-
"@blueprintjs/
|
|
101
|
+
"@babel/core": "^7.23.3",
|
|
102
|
+
"@babel/eslint-parser": "^7.23.3",
|
|
103
|
+
"@babel/preset-react": "^7.23.3",
|
|
104
|
+
"@blueprintjs/core": "^5.6.0",
|
|
105
|
+
"@blueprintjs/icons": "^5.3.0",
|
|
104
106
|
"@playwright/experimental-ct-react": "^1.39.0",
|
|
105
107
|
"@playwright/test": "^1.39.0",
|
|
106
|
-
"@storybook/addon-essentials": "7.
|
|
107
|
-
"@storybook/addon-storysource": "7.
|
|
108
|
-
"@storybook/blocks": "7.
|
|
109
|
-
"@storybook/react": "7.
|
|
110
|
-
"@storybook/react-vite": "7.
|
|
111
|
-
"@types/babel__core": "^7.20.
|
|
112
|
-
"@types/d3-scale-chromatic": "^3.0.
|
|
113
|
-
"@types/lodash": "^4.14.
|
|
114
|
-
"@types/react": "^18.2.
|
|
115
|
-
"@types/react-dom": "^18.2.
|
|
116
|
-
"@types/react-inspector": "^4.0.
|
|
117
|
-
"@vitejs/plugin-react": "^4.1.
|
|
108
|
+
"@storybook/addon-essentials": "7.5.3",
|
|
109
|
+
"@storybook/addon-storysource": "7.5.3",
|
|
110
|
+
"@storybook/blocks": "7.5.3",
|
|
111
|
+
"@storybook/react": "7.5.3",
|
|
112
|
+
"@storybook/react-vite": "7.5.3",
|
|
113
|
+
"@types/babel__core": "^7.20.4",
|
|
114
|
+
"@types/d3-scale-chromatic": "^3.0.2",
|
|
115
|
+
"@types/lodash": "^4.14.201",
|
|
116
|
+
"@types/react": "^18.2.37",
|
|
117
|
+
"@types/react-dom": "^18.2.15",
|
|
118
|
+
"@types/react-inspector": "^4.0.5",
|
|
119
|
+
"@vitejs/plugin-react": "^4.1.1",
|
|
118
120
|
"@vitest/coverage-v8": "^0.34.6",
|
|
119
121
|
"cheminfo-font": "^1.12.0",
|
|
120
122
|
"cross-env": "^7.0.3",
|
|
121
|
-
"eslint": "^8.
|
|
123
|
+
"eslint": "^8.53.0",
|
|
122
124
|
"eslint-config-zakodium": "^8.0.2",
|
|
123
125
|
"eslint-plugin-storybook": "^0.6.15",
|
|
124
|
-
"prettier": "^3.0
|
|
126
|
+
"prettier": "^3.1.0",
|
|
125
127
|
"react": "^18.2.0",
|
|
126
128
|
"react-dom": "^18.2.0",
|
|
127
129
|
"react-ocl": "^6.1.0",
|
|
128
130
|
"rimraf": "^5.0.5",
|
|
129
|
-
"storybook": "7.
|
|
131
|
+
"storybook": "7.5.3",
|
|
130
132
|
"typescript": "^5.2.2",
|
|
131
|
-
"vite": "^4.
|
|
133
|
+
"vite": "^4.5.0",
|
|
132
134
|
"vitest": "^0.34.6"
|
|
133
135
|
},
|
|
134
136
|
"repository": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryResult, useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { FileCollection, fileCollectionFromWebSource } from 'filelist-utils';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
|
|
@@ -10,7 +10,9 @@ type LoadFn = (
|
|
|
10
10
|
dispatch: AppDispatch,
|
|
11
11
|
) => Promise<void>;
|
|
12
12
|
|
|
13
|
-
export function useLoadFileCollectionFromHash(
|
|
13
|
+
export function useLoadFileCollectionFromHash(
|
|
14
|
+
onLoad: LoadFn,
|
|
15
|
+
): UseQueryResult<true | null> {
|
|
14
16
|
const appDispatch = useAppDispatch();
|
|
15
17
|
const hashParams = useHashSearchParams();
|
|
16
18
|
const filelistUrl = hashParams.get('filelist');
|
|
@@ -52,8 +52,7 @@ export function SignalProcessingPanel(props: SignalProcessingPanelProps) {
|
|
|
52
52
|
<div style={{ display: 'flex', gap: '3px' }}>
|
|
53
53
|
<Button
|
|
54
54
|
style={{ width: '15px' }}
|
|
55
|
-
|
|
56
|
-
backgroundColor={{ basic: 'green' }}
|
|
55
|
+
intent="success"
|
|
57
56
|
onClick={() => {
|
|
58
57
|
const newFilters = [...filters];
|
|
59
58
|
newFilters.splice(
|
|
@@ -68,8 +67,7 @@ export function SignalProcessingPanel(props: SignalProcessingPanelProps) {
|
|
|
68
67
|
</Button>
|
|
69
68
|
<Button
|
|
70
69
|
style={{ width: '15px' }}
|
|
71
|
-
|
|
72
|
-
backgroundColor={{ basic: 'red' }}
|
|
70
|
+
intent="danger"
|
|
73
71
|
onClick={() => {
|
|
74
72
|
onChange?.(filters.filter((_, j) => j !== i));
|
|
75
73
|
}}
|
|
@@ -126,8 +124,7 @@ export function SignalProcessingPanel(props: SignalProcessingPanelProps) {
|
|
|
126
124
|
{filters.length === 0 && (
|
|
127
125
|
<Button
|
|
128
126
|
style={{ width: '15px', margin: '5px 20px' }}
|
|
129
|
-
|
|
130
|
-
backgroundColor={{ basic: 'green' }}
|
|
127
|
+
intent="success"
|
|
131
128
|
onClick={() => {
|
|
132
129
|
const newFilters = [getDefaultFilter(defaultFilters[0])];
|
|
133
130
|
onChange?.(newFilters);
|
|
@@ -1,66 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
Button as BlueprintButton,
|
|
3
|
+
AnchorButton as BlueprintAnchorButton,
|
|
4
|
+
ButtonProps as BlueprintButtonProps,
|
|
5
|
+
AnchorButtonProps as BlueprintAnchorButtonProps,
|
|
6
|
+
Tooltip,
|
|
7
|
+
TooltipProps,
|
|
8
|
+
} from '@blueprintjs/core';
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
children
|
|
12
|
-
|
|
13
|
-
color?: Colorhover;
|
|
14
|
-
onClick?: () => void;
|
|
15
|
-
style?: CSSProperties;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
}
|
|
10
|
+
type BlueprintProps = {
|
|
11
|
+
[key in keyof BlueprintButtonProps &
|
|
12
|
+
keyof BlueprintAnchorButtonProps]?: BlueprintButtonProps[key] &
|
|
13
|
+
BlueprintAnchorButtonProps[key];
|
|
14
|
+
};
|
|
15
|
+
export type ButtonProps = BlueprintProps & {
|
|
16
|
+
tooltipProps?: Omit<TooltipProps, 'children'>;
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
export function Button(props: ButtonProps) {
|
|
20
|
-
const {
|
|
21
|
-
backgroundColor = {
|
|
22
|
-
basic: 'hsl(21deg, 90%, 48%)',
|
|
23
|
-
hover: 'hsl(21deg, 90%, 40%)',
|
|
24
|
-
},
|
|
25
|
-
color = { basic: 'white', hover: 'white' },
|
|
26
|
-
style,
|
|
27
|
-
onClick,
|
|
28
|
-
children,
|
|
29
|
-
disabled = false,
|
|
30
|
-
} = props;
|
|
20
|
+
const { tooltipProps, children, ...buttonProps } = props;
|
|
31
21
|
|
|
22
|
+
const InnerButton = buttonProps.disabled
|
|
23
|
+
? BlueprintAnchorButton
|
|
24
|
+
: BlueprintButton;
|
|
32
25
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
paddingBottom: 6,
|
|
43
|
-
borderWidth: 1,
|
|
44
|
-
borderColor: 'transparent',
|
|
45
|
-
fontSize: '1.125em',
|
|
46
|
-
borderRadius: 6,
|
|
47
|
-
color: color.basic,
|
|
48
|
-
minWidth: 30,
|
|
49
|
-
justifyContent: 'center',
|
|
50
|
-
backgroundColor: backgroundColor.basic,
|
|
51
|
-
':hover:enabled': {
|
|
52
|
-
color: color.hover,
|
|
53
|
-
backgroundColor: backgroundColor.hover,
|
|
54
|
-
},
|
|
55
|
-
':disabled': {
|
|
56
|
-
opacity: 0.5,
|
|
57
|
-
cursor: 'not-allowed',
|
|
58
|
-
},
|
|
59
|
-
})}
|
|
60
|
-
type="button"
|
|
61
|
-
disabled={disabled}
|
|
62
|
-
>
|
|
63
|
-
{children}
|
|
64
|
-
</button>
|
|
26
|
+
<Tooltip
|
|
27
|
+
fill={tooltipProps?.fill || buttonProps.fill}
|
|
28
|
+
{...tooltipProps}
|
|
29
|
+
renderTarget={(targetProps) => (
|
|
30
|
+
<InnerButton {...targetProps} {...buttonProps}>
|
|
31
|
+
{children}
|
|
32
|
+
</InnerButton>
|
|
33
|
+
)}
|
|
34
|
+
/>
|
|
65
35
|
);
|
|
66
36
|
}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
+
import { NonIdealState, Button, Colors } from '@blueprintjs/core';
|
|
2
|
+
import type { IconName } from '@blueprintjs/icons';
|
|
1
3
|
import styled from '@emotion/styled';
|
|
4
|
+
import { rgba } from 'polished';
|
|
2
5
|
import { CSSProperties, MouseEventHandler, useCallback, useMemo } from 'react';
|
|
3
6
|
import { FileError, FileRejection, useDropzone } from 'react-dropzone';
|
|
4
|
-
import { FaCloudUploadAlt } from 'react-icons/fa';
|
|
5
7
|
|
|
6
8
|
export interface DropZoneProps {
|
|
7
|
-
color?: string;
|
|
8
9
|
borderColor?: string;
|
|
9
10
|
onDrop?: <T extends File>(
|
|
10
11
|
acceptedFiles: T[],
|
|
11
12
|
rejectedFiles?: FileRejection[],
|
|
12
13
|
) => void;
|
|
13
14
|
fileValidator?: <T extends File>(file: T) => FileError | FileError[] | null;
|
|
14
|
-
|
|
15
|
+
emptyIcon?: IconName;
|
|
16
|
+
emptyTitle?: string;
|
|
17
|
+
emptyDescription?: string;
|
|
18
|
+
emptyButtonText?: string;
|
|
19
|
+
emptyButtonIcon?: IconName;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
const DropzoneRoot = styled.div`
|
|
@@ -22,35 +27,29 @@ const DropzoneRoot = styled.div`
|
|
|
22
27
|
|
|
23
28
|
interface DropzoneColorProps {
|
|
24
29
|
borderColor: CSSProperties['borderColor'];
|
|
25
|
-
color: CSSProperties['color'];
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
const DropzoneDragActive = styled.div<DropzoneColorProps>`
|
|
29
|
-
font-size: 1.5em;
|
|
30
|
-
font-weight: 600;
|
|
31
33
|
position: absolute;
|
|
32
34
|
top: 0;
|
|
33
35
|
bottom: 0;
|
|
34
36
|
left: 0;
|
|
35
37
|
right: 0;
|
|
36
|
-
|
|
37
|
-
background-color: white;
|
|
38
|
+
background-color: rgb(255, 255, 255, 0.7);
|
|
38
39
|
border: 5px dashed;
|
|
39
40
|
display: flex;
|
|
40
41
|
flex-direction: column;
|
|
41
42
|
align-items: center;
|
|
42
43
|
justify-content: center;
|
|
43
44
|
|
|
44
|
-
border-color: ${({ borderColor }) =>
|
|
45
|
-
|
|
45
|
+
border-color: ${({ borderColor }) =>
|
|
46
|
+
borderColor ? rgba(borderColor, 0.7) : ''};
|
|
46
47
|
`;
|
|
47
48
|
|
|
48
49
|
const DropzoneEmpty = styled.div<DropzoneColorProps>`
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
align-items: center;
|
|
53
|
-
justify-content: center;
|
|
50
|
+
:hover .dropzone-button {
|
|
51
|
+
background-color: ${rgba(Colors.BLUE3, 0.15)};
|
|
52
|
+
}
|
|
54
53
|
width: 100%;
|
|
55
54
|
height: 100%;
|
|
56
55
|
padding: 1em;
|
|
@@ -58,7 +57,6 @@ const DropzoneEmpty = styled.div<DropzoneColorProps>`
|
|
|
58
57
|
cursor: pointer;
|
|
59
58
|
|
|
60
59
|
border-color: ${({ borderColor }) => borderColor};
|
|
61
|
-
color: ${({ color }) => color};
|
|
62
60
|
`;
|
|
63
61
|
|
|
64
62
|
export function DropZone(props: DropZoneProps) {
|
|
@@ -77,17 +75,24 @@ function DropZoneContent(
|
|
|
77
75
|
props: DropZoneProps & {
|
|
78
76
|
children?: JSX.Element | null;
|
|
79
77
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
80
|
-
|
|
78
|
+
emptyIcon?: IconName;
|
|
79
|
+
emptyTitle?: string;
|
|
80
|
+
emptyDescription?: string;
|
|
81
|
+
emptyButtonText?: string;
|
|
82
|
+
emptyButtonIcon?: IconName;
|
|
81
83
|
},
|
|
82
84
|
) {
|
|
83
85
|
const {
|
|
84
|
-
|
|
85
|
-
borderColor = 'gray',
|
|
86
|
+
borderColor = Colors.GRAY3,
|
|
86
87
|
children = null,
|
|
87
88
|
onDrop,
|
|
88
|
-
emptyText = 'Click or drag and drop to add data.',
|
|
89
89
|
onClick,
|
|
90
90
|
fileValidator,
|
|
91
|
+
emptyIcon = 'import',
|
|
92
|
+
emptyTitle = 'No data loaded',
|
|
93
|
+
emptyDescription = 'You can load data by drag-and-dropping files here',
|
|
94
|
+
emptyButtonText = 'Select files',
|
|
95
|
+
emptyButtonIcon = 'plus',
|
|
91
96
|
} = props;
|
|
92
97
|
|
|
93
98
|
const hasChildren = children !== null;
|
|
@@ -115,13 +120,25 @@ function DropZoneContent(
|
|
|
115
120
|
<DropzoneRoot {...getRootProps(getPropsOptions)}>
|
|
116
121
|
{children}
|
|
117
122
|
{isDragActive ? (
|
|
118
|
-
<DropzoneDragActive borderColor={borderColor}
|
|
119
|
-
<
|
|
120
|
-
<p>Drop the files here.</p>
|
|
123
|
+
<DropzoneDragActive borderColor={borderColor}>
|
|
124
|
+
<NonIdealState icon="cloud-upload" title="Drop the files here" />
|
|
121
125
|
</DropzoneDragActive>
|
|
122
126
|
) : !hasChildren ? (
|
|
123
|
-
<DropzoneEmpty borderColor={borderColor}
|
|
124
|
-
|
|
127
|
+
<DropzoneEmpty borderColor={borderColor}>
|
|
128
|
+
<NonIdealState
|
|
129
|
+
icon={emptyIcon}
|
|
130
|
+
title={emptyTitle}
|
|
131
|
+
description={emptyDescription}
|
|
132
|
+
action={
|
|
133
|
+
<Button
|
|
134
|
+
className="dropzone-button"
|
|
135
|
+
outlined
|
|
136
|
+
text={emptyButtonText}
|
|
137
|
+
icon={emptyButtonIcon}
|
|
138
|
+
intent="primary"
|
|
139
|
+
/>
|
|
140
|
+
}
|
|
141
|
+
/>
|
|
125
142
|
</DropzoneEmpty>
|
|
126
143
|
) : null}
|
|
127
144
|
<input {...getInputProps()} />
|
|
@@ -21,6 +21,7 @@ export interface RadioGroupProps {
|
|
|
21
21
|
name?: string;
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
variant?: InputVariant;
|
|
24
|
+
id?: string;
|
|
24
25
|
}
|
|
25
26
|
const rootStyles = {
|
|
26
27
|
basic: css({
|
|
@@ -41,6 +42,7 @@ const rootStyles = {
|
|
|
41
42
|
};
|
|
42
43
|
export function RadioGroup(props: RadioGroupProps) {
|
|
43
44
|
const {
|
|
45
|
+
id,
|
|
44
46
|
selected,
|
|
45
47
|
type = 'classic',
|
|
46
48
|
disabled: groupDisabled = false,
|
|
@@ -51,6 +53,7 @@ export function RadioGroup(props: RadioGroupProps) {
|
|
|
51
53
|
} = props;
|
|
52
54
|
return (
|
|
53
55
|
<RadioGroupRadix.Root
|
|
56
|
+
id={id}
|
|
54
57
|
css={[
|
|
55
58
|
rootStyles.basic,
|
|
56
59
|
type === 'classic' ? null : rootStyles.button(variant),
|