react-science 0.19.2 → 0.20.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/app/about/AboutDialogToolbarButton.js +10 -10
- package/lib/app/explorer/MeasurementExplorer.js +36 -43
- package/lib/app/helpers/react-plot.js +16 -13
- package/lib/app/kinds/iv/plot-view/IvPlotView.js +14 -13
- package/lib/app/panels/measurements/MeasurementCheckbox.js +10 -8
- package/lib/app/panels/measurements/MeasurementColorPreview.js +9 -7
- package/lib/app/panels/measurements/MeasurementsTable.js +81 -94
- package/lib/components/button/ButtonGroup.js +31 -43
- package/lib/components/color-picker/color-picker-dropdown/ColorPickerDropdown.js +18 -21
- package/lib/components/drop-zone/DropZone.js +48 -48
- package/lib/components/dropdown-menu/DropdownMenu.js +4 -4
- package/lib/components/forms/Input.js +150 -0
- package/lib/components/forms/context/FieldsContext.js +54 -0
- package/lib/components/forms/context/index.js +17 -0
- package/lib/components/forms/index.js +18 -0
- package/lib/components/index.js +1 -0
- package/lib/components/modal/ConfirmModal.js +40 -29
- package/lib/components/modal/Modal.js +45 -34
- package/lib/components/root-layout/RootLayout.js +1 -1
- package/lib/components/root-layout/css-reset/customPreflight.js +10 -3
- package/lib/components/spinner/FullSpinner.js +10 -7
- package/lib-esm/app/about/AboutDialogToolbarButton.d.ts +1 -1
- package/lib-esm/app/about/AboutDialogToolbarButton.d.ts.map +1 -1
- package/lib-esm/app/about/AboutDialogToolbarButton.js +7 -10
- package/lib-esm/app/about/AboutDialogToolbarButton.js.map +1 -1
- package/lib-esm/app/explorer/MeasurementExplorer.d.ts +2 -1
- package/lib-esm/app/explorer/MeasurementExplorer.d.ts.map +1 -1
- package/lib-esm/app/explorer/MeasurementExplorer.js +31 -41
- package/lib-esm/app/explorer/MeasurementExplorer.js.map +1 -1
- package/lib-esm/app/helpers/MeasurementPlot.js.map +1 -1
- package/lib-esm/app/helpers/react-plot.d.ts +4 -2
- package/lib-esm/app/helpers/react-plot.d.ts.map +1 -1
- package/lib-esm/app/helpers/react-plot.js +11 -11
- package/lib-esm/app/helpers/react-plot.js.map +1 -1
- package/lib-esm/app/kinds/iv/plot-view/IvPlotView.d.ts +2 -1
- package/lib-esm/app/kinds/iv/plot-view/IvPlotView.d.ts.map +1 -1
- package/lib-esm/app/kinds/iv/plot-view/IvPlotView.js +14 -13
- package/lib-esm/app/kinds/iv/plot-view/IvPlotView.js.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementCheckbox.d.ts +2 -1
- package/lib-esm/app/panels/measurements/MeasurementCheckbox.d.ts.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementCheckbox.js +4 -5
- package/lib-esm/app/panels/measurements/MeasurementCheckbox.js.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementColorPreview.d.ts +2 -1
- package/lib-esm/app/panels/measurements/MeasurementColorPreview.d.ts.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementColorPreview.js +4 -5
- package/lib-esm/app/panels/measurements/MeasurementColorPreview.js.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementsTable.d.ts +2 -1
- package/lib-esm/app/panels/measurements/MeasurementsTable.d.ts.map +1 -1
- package/lib-esm/app/panels/measurements/MeasurementsTable.js +81 -94
- package/lib-esm/app/panels/measurements/MeasurementsTable.js.map +1 -1
- package/lib-esm/components/button/ButtonGroup.d.ts +2 -2
- package/lib-esm/components/button/ButtonGroup.d.ts.map +1 -1
- package/lib-esm/components/button/ButtonGroup.js +28 -43
- package/lib-esm/components/button/ButtonGroup.js.map +1 -1
- package/lib-esm/components/color-picker/color-picker-dropdown/ColorPickerDropdown.d.ts +2 -1
- package/lib-esm/components/color-picker/color-picker-dropdown/ColorPickerDropdown.d.ts.map +1 -1
- package/lib-esm/components/color-picker/color-picker-dropdown/ColorPickerDropdown.js +16 -19
- package/lib-esm/components/color-picker/color-picker-dropdown/ColorPickerDropdown.js.map +1 -1
- package/lib-esm/components/drop-zone/DropZone.d.ts +2 -2
- package/lib-esm/components/drop-zone/DropZone.d.ts.map +1 -1
- package/lib-esm/components/drop-zone/DropZone.js +42 -45
- package/lib-esm/components/drop-zone/DropZone.js.map +1 -1
- package/lib-esm/components/dropdown-menu/DropdownMenu.js +4 -4
- package/lib-esm/components/dropdown-menu/DropdownMenu.js.map +1 -1
- package/lib-esm/components/forms/Input.d.ts +17 -0
- package/lib-esm/components/forms/Input.d.ts.map +1 -0
- package/lib-esm/components/forms/Input.js +144 -0
- package/lib-esm/components/forms/Input.js.map +1 -0
- package/lib-esm/components/forms/context/FieldsContext.d.ts +16 -0
- package/lib-esm/components/forms/context/FieldsContext.d.ts.map +1 -0
- package/lib-esm/components/forms/context/FieldsContext.js +47 -0
- package/lib-esm/components/forms/context/FieldsContext.js.map +1 -0
- package/lib-esm/components/forms/context/index.d.ts +2 -0
- package/lib-esm/components/forms/context/index.d.ts.map +1 -0
- package/lib-esm/components/forms/context/index.js +2 -0
- package/lib-esm/components/forms/context/index.js.map +1 -0
- package/lib-esm/components/forms/index.d.ts +3 -0
- package/lib-esm/components/forms/index.d.ts.map +1 -0
- package/lib-esm/components/forms/index.js +3 -0
- package/lib-esm/components/forms/index.js.map +1 -0
- package/lib-esm/components/index.d.ts +1 -0
- package/lib-esm/components/index.d.ts.map +1 -1
- package/lib-esm/components/index.js +1 -0
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/modal/ConfirmModal.d.ts +1 -1
- package/lib-esm/components/modal/ConfirmModal.d.ts.map +1 -1
- package/lib-esm/components/modal/ConfirmModal.js +37 -29
- package/lib-esm/components/modal/ConfirmModal.js.map +1 -1
- package/lib-esm/components/modal/Modal.d.ts +4 -4
- package/lib-esm/components/modal/Modal.d.ts.map +1 -1
- package/lib-esm/components/modal/Modal.js +45 -34
- package/lib-esm/components/modal/Modal.js.map +1 -1
- package/lib-esm/components/root-layout/RootLayout.d.ts.map +1 -1
- package/lib-esm/components/root-layout/RootLayout.js +2 -2
- package/lib-esm/components/root-layout/RootLayout.js.map +1 -1
- package/lib-esm/components/root-layout/css-reset/customPreflight.d.ts +5 -1
- package/lib-esm/components/root-layout/css-reset/customPreflight.d.ts.map +1 -1
- package/lib-esm/components/root-layout/css-reset/customPreflight.js +6 -2
- package/lib-esm/components/root-layout/css-reset/customPreflight.js.map +1 -1
- package/lib-esm/components/spinner/FullSpinner.d.ts +7 -1
- package/lib-esm/components/spinner/FullSpinner.d.ts.map +1 -1
- package/lib-esm/components/spinner/FullSpinner.js +8 -8
- package/lib-esm/components/spinner/FullSpinner.js.map +1 -1
- package/package.json +1 -1
- package/src/app/about/AboutDialogToolbarButton.tsx +6 -9
- package/src/app/explorer/MeasurementExplorer.tsx +47 -59
- package/src/app/helpers/MeasurementPlot.tsx +1 -0
- package/src/app/helpers/react-plot.tsx +24 -19
- package/src/app/kinds/iv/plot-view/IvPlotView.tsx +18 -19
- package/src/app/panels/measurements/MeasurementCheckbox.tsx +3 -5
- package/src/app/panels/measurements/MeasurementColorPreview.tsx +4 -6
- package/src/app/panels/measurements/MeasurementsTable.tsx +112 -115
- package/src/components/button/ButtonGroup.tsx +30 -44
- package/src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx +19 -26
- package/src/components/drop-zone/DropZone.tsx +54 -56
- package/src/components/dropdown-menu/DropdownMenu.tsx +19 -17
- package/src/components/forms/Input.tsx +255 -0
- package/src/components/forms/context/FieldsContext.tsx +82 -0
- package/src/components/forms/context/index.ts +1 -0
- package/src/components/forms/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/components/modal/ConfirmModal.tsx +49 -44
- package/src/components/modal/Modal.tsx +54 -58
- package/src/components/root-layout/RootLayout.tsx +3 -7
- package/src/components/root-layout/css-reset/customPreflight.ts +6 -2
- package/src/components/spinner/FullSpinner.tsx +14 -9
|
@@ -1,84 +1,73 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
|
|
3
|
-
import { css } from '@emotion/react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/styled';
|
|
4
3
|
import { FaTrash } from 'react-icons/fa';
|
|
5
4
|
import { useAppDispatch, useAppState, } from '../../../app-data/index';
|
|
6
5
|
import { ConfirmModal, useOnOff } from '../../../components/index';
|
|
7
6
|
import { MeasurementCheckbox } from './MeasurementCheckbox';
|
|
8
7
|
import MeasurementColorPreview from './MeasurementColorPreview';
|
|
9
8
|
import MeasurementVisibilityToggle, { MeasurementSelectedVisibilityChange, } from './MeasurementVisibilityToggle';
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
const MeasurementsTableContainer = styled.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 5px;
|
|
13
|
+
`;
|
|
14
|
+
const MeasurementsTableRoot = styled.table `
|
|
15
|
+
font-size: 0.875rem;
|
|
16
|
+
line-height: 1.25rem;
|
|
17
|
+
border-collapse: collapse;
|
|
18
|
+
table-layout: fixed;
|
|
19
|
+
`;
|
|
20
|
+
const MeasurementsTableHeaderStyled = styled.tr `
|
|
21
|
+
border-bottom-width: 1px;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
text-align: left;
|
|
24
|
+
padding-bottom: 10px;
|
|
25
|
+
padding-top: 10px;
|
|
26
|
+
padding-left: 2rem;
|
|
27
|
+
`;
|
|
28
|
+
const MeasurementsTableBody = styled.tbody `
|
|
29
|
+
background-color: white;
|
|
30
|
+
`;
|
|
31
|
+
const MeasurementsLinkButton = styled.span `
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
:hover {
|
|
34
|
+
text-decoration: underline;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
const MeasurementsHeaderColumn = styled.div `
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: row;
|
|
40
|
+
gap: 10px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
padding-left: 5px;
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
`,
|
|
50
|
-
iconsContainer: css `
|
|
51
|
-
display: flex;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-items: center;
|
|
55
|
-
height: 50px;
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
gap: 0.5rem;
|
|
58
|
-
cursor: default;
|
|
59
|
-
width: 70px;
|
|
60
|
-
`,
|
|
61
|
-
linkButton: css `
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
:hover {
|
|
64
|
-
text-decoration: underline;
|
|
65
|
-
}
|
|
66
|
-
`,
|
|
67
|
-
container: css `
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
gap: 5px;
|
|
71
|
-
`,
|
|
72
|
-
headerColumn: css `
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: row;
|
|
75
|
-
gap: 10px;
|
|
76
|
-
align-items: center;
|
|
77
|
-
padding-left: 5px;
|
|
44
|
+
border-bottom: 1px solid black;
|
|
45
|
+
`;
|
|
46
|
+
const MeasurementsTableRowData = styled.tr `
|
|
47
|
+
height: 50px;
|
|
48
|
+
max-height: 50px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
padding-left: 2rem;
|
|
52
|
+
padding-bottom: 10px;
|
|
53
|
+
padding-top: 10px;
|
|
54
|
+
border-bottom-width: 1px;
|
|
78
55
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
line-height: 1.25rem;
|
|
59
|
+
`;
|
|
60
|
+
const MeasurementsIconsContainer = styled.td `
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-items: center;
|
|
65
|
+
height: 50px;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
gap: 0.5rem;
|
|
68
|
+
cursor: default;
|
|
69
|
+
width: 70px;
|
|
70
|
+
`;
|
|
82
71
|
export function MeasurementsTable(props) {
|
|
83
72
|
const { kind } = props;
|
|
84
73
|
const { data: { measurements }, view: { selectedMeasurements }, } = useAppState();
|
|
@@ -98,28 +87,26 @@ export function MeasurementsTable(props) {
|
|
|
98
87
|
dispatch({ type: 'REMOVE_SELECTED_MEASUREMENTS', payload: { kind } });
|
|
99
88
|
closeRemoveModal();
|
|
100
89
|
}
|
|
101
|
-
return (_jsxs(
|
|
90
|
+
return (_jsxs(MeasurementsTableContainer, { children: [_jsxs(MeasurementsHeaderColumn, { children: [_jsx(MeasurementSelectedVisibilityChange, { kind: kind, openedEyes: true }), _jsx(MeasurementSelectedVisibilityChange, { kind: kind, openedEyes: false }), _jsx(MeasurementsLinkButton, { onClick: () => onSelectLink(true), children: "Select all" }), _jsx(MeasurementsLinkButton, { onClick: () => onSelectLink(false), children: "Unselect all" }), _jsx(FaTrash, { style: hasSelectedMeasurements ? { cursor: 'pointer' } : { opacity: 0.6 }, onClick: hasSelectedMeasurements ? openRemoveModal : undefined }), _jsx(ConfirmModal, { headerColor: "red", isOpen: isRemoveModalOpen, onConfirm: onRemove, onRequestClose: closeRemoveModal, saveText: "Remove", children: _jsx("div", { style: { fontWeight: 'bold', padding: 10 }, children: "Remove selected measurements?" }) })] }), _jsxs(MeasurementsTableRoot, { children: [_jsx(MeasurementsTableHeader, {}), _jsx(MeasurementsTableBody, { children: measurements[kind].entries.map((element) => (_jsx(MeasurementsTableRow, { item: element, kind: kind }, element.id))) })] })] }));
|
|
102
91
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`,
|
|
120
|
-
};
|
|
92
|
+
const TableHeaderEmpty = styled.th `
|
|
93
|
+
display: flex;
|
|
94
|
+
gap: 5px;
|
|
95
|
+
align-items: center;
|
|
96
|
+
width: 70px;
|
|
97
|
+
`;
|
|
98
|
+
const TableHeaderFilename = styled.th `
|
|
99
|
+
width: 60%;
|
|
100
|
+
`;
|
|
101
|
+
const TableHeaderTechnique = styled.th `
|
|
102
|
+
width: 150px;
|
|
103
|
+
`;
|
|
104
|
+
const TableDataHeaderName = styled.td `
|
|
105
|
+
width: 60%;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
`;
|
|
121
108
|
function MeasurementsTableHeader() {
|
|
122
|
-
return (_jsx("thead", { children: _jsxs(
|
|
109
|
+
return (_jsx("thead", { children: _jsxs(MeasurementsTableHeaderStyled, { children: [_jsx(TableHeaderEmpty, {}), _jsx(TableHeaderFilename, { children: "Filename" }), _jsx(TableHeaderTechnique, { children: "Technique" })] }) }));
|
|
123
110
|
}
|
|
124
111
|
function MeasurementsTableRow(props) {
|
|
125
112
|
const { item, kind } = props;
|
|
@@ -138,6 +125,6 @@ function MeasurementsTableRow(props) {
|
|
|
138
125
|
payload: { id: item.id, kind, acc: isAlreadyChecked ? 'remove' : 'add' },
|
|
139
126
|
});
|
|
140
127
|
}
|
|
141
|
-
return (_jsxs(
|
|
128
|
+
return (_jsxs(MeasurementsTableRowData, { children: [_jsxs(MeasurementsIconsContainer, { children: [_jsx(MeasurementVisibilityToggle, { id: item.id, isVisible: measurements[item.id].visible }), _jsx(MeasurementColorPreview, { measurementId: item.id, kind: kind, color: measurements[item.id].color }), _jsx(MeasurementCheckbox, { checked: selectedMeasurements[kind]?.includes(item.id) || false, onSelectCheckbox: onSelectCheckbox })] }), _jsx(TableDataHeaderName, { onClick: onSelectRow, title: item.id, children: item.info.file?.name ?? item.info.title }), _jsx("td", { onClick: onSelectRow, children: item.meta.technique })] }));
|
|
142
129
|
}
|
|
143
130
|
//# sourceMappingURL=MeasurementsTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeasurementsTable.js","sourceRoot":"","sources":["../../../../src/app/panels/measurements/MeasurementsTable.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"MeasurementsTable.js","sourceRoot":"","sources":["../../../../src/app/panels/measurements/MeasurementsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAGL,cAAc,EACd,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,2BAA2B,EAAE,EAClC,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AAWvC,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI5C,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAA;;;;;CAKzC,CAAC;AAEF,MAAM,6BAA6B,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;CAO9C,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAA;;CAEzC,CAAC;AAEF,MAAM,sBAAs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CAAC,KAAK,GAClC,EACF,KAAC,mBAAmB,IAClB,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,EAC/D,gBAAgB,EAAE,gBAAgB,GAClC,IACyB,EAC7B,KAAC,mBAAmB,IAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,YACtD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GACpB,EACtB,aAAI,OAAO,EAAE,WAAW,YAAG,IAAI,CAAC,IAAI,CAAC,SAAS,GAAM,IAC3B,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
interface ButtonGroupProps {
|
|
3
3
|
children: [ReactNode, ReactNode];
|
|
4
4
|
}
|
|
5
|
-
export declare function ButtonGroup(props: ButtonGroupProps):
|
|
5
|
+
export declare function ButtonGroup(props: ButtonGroupProps): JSX.Element;
|
|
6
6
|
export declare namespace ButtonGroup {
|
|
7
|
-
var Button: (props: ButtonGroupButtonProps) =>
|
|
7
|
+
var Button: (props: ButtonGroupButtonProps) => JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
interface ButtonGroupButtonProps {
|
|
10
10
|
position: 'first' | 'last';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/button/ButtonGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/button/ButtonGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4BlC,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAClC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAGlD;yBAHe,WAAW;;;AAK3B,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1,50 +1,35 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
display: inline-flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
font-weight: 500;
|
|
30
|
-
font-size: 0.875rem;
|
|
31
|
-
line-height: 1.25rem;
|
|
32
|
-
padding-left: 1rem;
|
|
33
|
-
padding-right: 1rem;
|
|
34
|
-
padding-top: 5px;
|
|
35
|
-
padding-bottom: 5px;
|
|
36
|
-
border-width: 1px;
|
|
37
|
-
border-top-right-radius: 0.375rem;
|
|
38
|
-
border-bottom-right-radius: 0.375rem;
|
|
39
|
-
margin-left: -1px;
|
|
40
|
-
`,
|
|
41
|
-
};
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
const ButtonGroupRoot = styled.div `
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
border-radius: 0.375rem;
|
|
6
|
+
isolation: isolate;
|
|
7
|
+
`;
|
|
8
|
+
const ButtonGroupCustomButton = styled.button `
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
font-size: 0.875rem;
|
|
14
|
+
line-height: 1.25rem;
|
|
15
|
+
padding-left: 1rem;
|
|
16
|
+
padding-right: 1rem;
|
|
17
|
+
padding-top: 5px;
|
|
18
|
+
padding-bottom: 5px;
|
|
19
|
+
border-width: 1px;
|
|
20
|
+
border-top-left-radius: ${({ isLast }) => !isLast && '0.375rem'};
|
|
21
|
+
border-bottom-left-radius: ${({ isLast }) => !isLast && '0.375rem'};
|
|
22
|
+
|
|
23
|
+
border-top-right-radius: ${({ isLast }) => isLast && '0.375rem'};
|
|
24
|
+
border-bottom-right-radius: ${({ isLast }) => isLast && '0.375rem'};
|
|
25
|
+
margin-left: ${({ isLast }) => isLast && '-1px'};
|
|
26
|
+
`;
|
|
42
27
|
export function ButtonGroup(props) {
|
|
43
28
|
const { children } = props;
|
|
44
|
-
return _jsx(
|
|
29
|
+
return _jsx(ButtonGroupRoot, { children: children });
|
|
45
30
|
}
|
|
46
31
|
ButtonGroup.Button = function ButtonGroupButton(props) {
|
|
47
32
|
const { position, label, onClick } = props;
|
|
48
|
-
return (_jsx(
|
|
33
|
+
return (_jsx(ButtonGroupCustomButton, { type: "button", onClick: onClick, isLast: position === 'last', children: label }));
|
|
49
34
|
};
|
|
50
35
|
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.js","sourceRoot":"","sources":["../../../src/components/button/ButtonGroup.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","sourceRoot":"","sources":["../../../src/components/button/ButtonGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIjC,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAqB;;;;;;;;;;;;4BAYtC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,UAAU;+BAClC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,UAAU;;6BAEvC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,UAAU;gCACjC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,UAAU;iBACnD,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,MAAM;CAChD,CAAC;AAMF,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,OAAO,KAAC,eAAe,cAAE,QAAQ,GAAmB,CAAC;AACvD,CAAC;AAQD,WAAW,CAAC,MAAM,GAAG,SAAS,iBAAiB,CAAC,KAA6B;IAC3E,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE3C,OAAO,CACL,KAAC,uBAAuB,IACtB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,KAAK,MAAM,YAE1B,KAAK,GACkB,CAC3B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ColorPickerProps } from '../react-color/ColorPicker';
|
|
2
3
|
type ColorPickerDropdownProps = Pick<ColorPickerProps, 'color' | 'presetColors' | 'disableAlpha' | 'onChange' | 'onChangeComplete'>;
|
|
3
|
-
export declare function ColorPickerDropdown(props: ColorPickerDropdownProps):
|
|
4
|
+
export declare function ColorPickerDropdown(props: ColorPickerDropdownProps): JSX.Element;
|
|
4
5
|
export {};
|
|
5
6
|
//# sourceMappingURL=ColorPickerDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorPickerDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG3E,KAAK,wBAAwB,GAAG,IAAI,CAClC,gBAAgB,EAChB,OAAO,GAAG,cAAc,GAAG,cAAc,GAAG,UAAU,GAAG,kBAAkB,CAC5E,CAAC;AAiBF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAsClE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
|
|
3
|
-
import { css } from '@emotion/react';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/styled';
|
|
4
3
|
import { useRef } from 'react';
|
|
5
4
|
import { useModifiedPopper } from '../../hooks/useModifiedPopper';
|
|
6
5
|
import { useOnClickOutside } from '../../hooks/useOnClickOutside';
|
|
@@ -9,21 +8,19 @@ import { Portal } from '../../root-layout/Portal';
|
|
|
9
8
|
import FixedColorPreview from '../preview/FixedColorPreview';
|
|
10
9
|
import { ColorPicker } from '../react-color/ColorPicker';
|
|
11
10
|
import * as colorHelper from '../react-color/helpers/color';
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`,
|
|
26
|
-
};
|
|
11
|
+
const ColorPickerRoot = styled.button `
|
|
12
|
+
position: relative;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border: 1px solid darkgray;
|
|
15
|
+
border-radius: 0.25rem;
|
|
16
|
+
height: 30px;
|
|
17
|
+
padding: 5px;
|
|
18
|
+
`;
|
|
19
|
+
const ColorPickerPreview = styled.div `
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
border-radius: 0.125rem;
|
|
23
|
+
`;
|
|
27
24
|
export function ColorPickerDropdown(props) {
|
|
28
25
|
const { color, ...otherProps } = props;
|
|
29
26
|
const ref = useRef(null);
|
|
@@ -34,7 +31,7 @@ export function ColorPickerDropdown(props) {
|
|
|
34
31
|
offset: 6,
|
|
35
32
|
});
|
|
36
33
|
useOnClickOutside(ref, close);
|
|
37
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
34
|
+
return (_jsxs(_Fragment, { children: [_jsx(ColorPickerRoot, { type: "button", ref: setReferenceElement, onClick: toggle, children: _jsx(ColorPickerPreview, { children: _jsx(FixedColorPreview, { color: hex }) }) }), isOpened && (_jsx(Portal, { children: _jsx("div", { ref: (div) => {
|
|
38
35
|
setPopperElement(div);
|
|
39
36
|
ref.current = div;
|
|
40
37
|
}, ...popperProps, children: _jsx(ColorPicker, { color: color, ...otherProps }) }) }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerDropdown.js","sourceRoot":"","sources":["../../../../src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"ColorPickerDropdown.js","sourceRoot":"","sources":["../../../../src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAA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W,IAAC,KAAK,EAAE,KAAK,KAAM,UAAU,GAAI,GACzC,GACC,CACV,IACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -7,9 +7,9 @@ export interface DropZoneProps {
|
|
|
7
7
|
fileValidator?: <T extends File>(file: T) => FileError | FileError[] | null;
|
|
8
8
|
emptyText?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function DropZone(props: DropZoneProps):
|
|
10
|
+
export declare function DropZone(props: DropZoneProps): JSX.Element;
|
|
11
11
|
export interface DropZoneContainerProps extends DropZoneProps {
|
|
12
12
|
children: JSX.Element | null;
|
|
13
13
|
}
|
|
14
|
-
export declare function DropZoneContainer(props: DropZoneContainerProps):
|
|
14
|
+
export declare function DropZoneContainer(props: DropZoneContainerProps): JSX.Element;
|
|
15
15
|
//# sourceMappingURL=DropZone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.d.ts","sourceRoot":"","sources":["../../../src/components/drop-zone/DropZone.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DropZone.d.ts","sourceRoot":"","sources":["../../../src/components/drop-zone/DropZone.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAe,MAAM,gBAAgB,CAAC;AAGvE,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,EACtB,aAAa,EAAE,CAAC,EAAE,EAClB,aAAa,CAAC,EAAE,aAAa,EAAE,KAC5B,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiDD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eAE5C;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAE9D"}
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
|
|
3
|
-
import { css } from '@emotion/react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/styled';
|
|
4
3
|
import { useCallback, useMemo } from 'react';
|
|
5
4
|
import { useDropzone } from 'react-dropzone';
|
|
6
5
|
import { FaCloudUploadAlt } from 'react-icons/fa';
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
6
|
+
const DropzoneRoot = styled.div `
|
|
7
|
+
position: relative;
|
|
8
|
+
height: 100%;
|
|
9
|
+
width: 100%;
|
|
10
|
+
`;
|
|
11
|
+
const DropzoneDragActive = styled.div `
|
|
12
|
+
font-size: 1.5em;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
opacity: 0.7;
|
|
20
|
+
background-color: white;
|
|
21
|
+
border: 5px dashed;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
|
|
27
|
+
border-color: ${({ borderColor }) => borderColor};
|
|
28
|
+
color: ${({ color }) => color};
|
|
29
|
+
`;
|
|
30
|
+
const DropzoneEmpty = styled.div `
|
|
31
|
+
font-size: 1.5em;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
padding: 1em;
|
|
39
|
+
border: 5px dashed;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
|
|
42
|
+
border-color: ${({ borderColor }) => borderColor};
|
|
43
|
+
color: ${({ color }) => color};
|
|
44
|
+
`;
|
|
42
45
|
export function DropZone(props) {
|
|
43
46
|
return _jsx(DropZoneContent, { ...props });
|
|
44
47
|
}
|
|
@@ -61,12 +64,6 @@ function DropZoneContent(props) {
|
|
|
61
64
|
return { onClick };
|
|
62
65
|
}
|
|
63
66
|
}, [onClick]);
|
|
64
|
-
return (_jsxs(
|
|
65
|
-
borderColor,
|
|
66
|
-
color,
|
|
67
|
-
}, children: [_jsx(FaCloudUploadAlt, { size: 70 }), _jsx("p", { children: "Drop the files here." })] })) : !hasChildren ? (_jsx("div", { css: dropZoneCss.empty, style: {
|
|
68
|
-
borderColor,
|
|
69
|
-
color,
|
|
70
|
-
}, children: emptyText })) : null, _jsx("input", { ...getInputProps() })] }));
|
|
67
|
+
return (_jsxs(DropzoneRoot, { ...getRootProps(getPropsOptions), children: [children, isDragActive ? (_jsxs(DropzoneDragActive, { borderColor: borderColor, color: color, children: [_jsx(FaCloudUploadAlt, { size: 70 }), _jsx("p", { children: "Drop the files here." })] })) : !hasChildren ? (_jsx(DropzoneEmpty, { borderColor: borderColor, color: color, children: emptyText })) : null, _jsx("input", { ...getInputProps() })] }));
|
|
71
68
|
}
|
|
72
69
|
//# sourceMappingURL=DropZone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/drop-zone/DropZone.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/drop-zone/DropZone.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAoC,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAA4B,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAalD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI9B,CAAC;AAOF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAoB;;;;;;;;;;;;;;;;kBAgBvC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;WACvC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;CAC9B,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAoB;;;;;;;;;;;;kBAYlC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;WACvC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;CAC9B,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,OAAO,KAAC,eAAe,OAAK,KAAK,GAAI,CAAC;AACxC,CAAC;AAMD,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,KAAC,eAAe,OAAK,KAAK,GAAI,CAAC;AACxC,CAAC;AAED,SAAS,eAAe,CACtB,KAIC;IAED,MAAM,EACJ,KAAK,GAAG,OAAO,EACf,WAAW,GAAG,MAAM,EACpB,QAAQ,GAAG,IAAI,EACf,MAAM,EACN,SAAS,GAAG,qCAAqC,EACjD,OAAO,EACP,aAAa,GACd,GAAG,KAAK,CAAC;IAEV,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,CAAC;IAEtC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAiB,aAAkB,EAAE,aAA8B,EAAE,EAAE;QACrE,MAAM,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IACzC,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC;QAChE,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,aAAa;QACxB,MAAM,EAAE,YAAY;KACrB,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,EAAE;QACnC,IAAI,OAAO,EAAE;YACX,OAAO,EAAE,OAAO,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,MAAC,YAAY,OAAK,YAAY,CAAC,eAAe,CAAC,aAC5C,QAAQ,EACR,YAAY,CAAC,CAAC,CAAC,CACd,MAAC,kBAAkB,IAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,aACxD,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,EAC9B,+CAA2B,IACR,CACtB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CACjB,KAAC,aAAa,IAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,YAClD,SAAS,GACI,CACjB,CAAC,CAAC,CAAC,IAAI,EACR,mBAAW,aAAa,EAAE,GAAI,IACjB,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -23,10 +23,10 @@ function DropdownContextMenu(props) {
|
|
|
23
23
|
const { isPopperElementOpen, closePopperElement, handleContextMenu, setPopperElement, styles, attributes, } = useContextMenuPlacement(otherProps.placement || 'right-start');
|
|
24
24
|
const ref = useRef(null);
|
|
25
25
|
useOnClickOutside(ref, closePopperElement);
|
|
26
|
-
return (_jsxs(HandleMenuContextDiv, { onContextMenu: handleContextMenu, children: [isPopperElementOpen && (_jsx("div", { ref: ref, children: _jsx("div", { ref: setPopperElement, style: styles.popper, ...attributes.popper, children: _jsx(Menu, { children: _jsx(MenuItems, { itemsStatic: true, onSelect: (selected) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
return (_jsxs(HandleMenuContextDiv, { onContextMenu: handleContextMenu, children: [isPopperElementOpen && (_jsx(Portal, { children: _jsx("div", { ref: ref, children: _jsx("div", { ref: setPopperElement, style: styles.popper, ...attributes.popper, children: _jsx(Menu, { children: _jsx(MenuItems, { itemsStatic: true, onSelect: (selected) => {
|
|
27
|
+
closePopperElement();
|
|
28
|
+
onSelect(selected);
|
|
29
|
+
}, ...otherProps }) }) }) }) })), children] }));
|
|
30
30
|
}
|
|
31
31
|
function DropdownClickMenu(props) {
|
|
32
32
|
const { placement = 'bottom-start', onSelect, ...otherProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAa,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAA2B,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2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AAU,GACd,GACE,GACF,GACC,CACV,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface RenderAddon {
|
|
3
|
+
addon: ReactNode;
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
7
|
+
variant?: 'default' | 'small';
|
|
8
|
+
leadingAddon?: RenderAddon;
|
|
9
|
+
trailingAddon?: RenderAddon;
|
|
10
|
+
help?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
valid?: true | string;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function Input(props: InputProps): JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqJtE,UAAU,WAAW;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAE9B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,aAAa,CAAC,EAAE,WAAW,CAAC;IAE5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,eA8DtC"}
|